From 84b0195688dfaf095ab419452519643a7c4dde7c Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Thu, 27 Aug 2015 18:11:38 -0400 Subject: [PATCH] hidpp20: initialize the profiles when the device has been enumerated When we read the profiles, we need to know the capabilities of the device. If the device has not been enumerated, then we are screwed. Signed-off-by: Benjamin Tissoires --- src/driver-hidpp20.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/driver-hidpp20.c b/src/driver-hidpp20.c index 9d652d3f..c3a3eada 100644 --- a/src/driver-hidpp20.c +++ b/src/driver-hidpp20.c @@ -429,8 +429,6 @@ hidpp20drv_probe(struct ratbag_device *device, const struct ratbag_id id) ratbag_set_drv_data(device, drv_data); - ratbag_device_init_profiles(device, 1, 8); - drv_data->proto_major = 1; drv_data->proto_minor = 0; @@ -449,6 +447,8 @@ hidpp20drv_probe(struct ratbag_device *device, const struct ratbag_id id) goto err; } + ratbag_device_init_profiles(device, 1, 8); + return rc; err: free(drv_data);