1
0
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:
Benjamin Tissoires
2015-08-27 18:11:38 -04:00
parent 28280240cb
commit 84b0195688

View File

@@ -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);