mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
roccat/etekcity: check for the presence of the key mapping report ID
Removes the duplicate nodes found by the drivers. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
This commit is contained in:
@@ -771,6 +771,11 @@ etekcity_probe(struct ratbag_device *device, const struct ratbag_id id)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (!ratbag_hidraw_has_report(device, ETEKCITY_REPORT_ID_KEY_MAPPING)) {
|
||||
ratbag_close_hidraw(device);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
drv_data = zalloc(sizeof(*drv_data));
|
||||
ratbag_set_drv_data(device, drv_data);
|
||||
|
||||
|
||||
@@ -784,6 +784,11 @@ roccat_probe(struct ratbag_device *device, const struct ratbag_id id)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (!ratbag_hidraw_has_report(device, ROCCAT_REPORT_ID_KEY_MAPPING)) {
|
||||
ratbag_close_hidraw(device);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
drv_data = zalloc(sizeof(*drv_data));
|
||||
ratbag_set_drv_data(device, drv_data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user