forked from drath/libratbag
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 <benjamin.tissoires@gmail.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user