mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
Don't check for the HID info when opening a hidraw node
This screws with the HID++1.0 unifying receivers. Let's punt the responsibility for opening the right hidraw node to the caller and only error out if we fail the ioctl. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -41,7 +41,6 @@ ratbag_open_hidraw(struct ratbag_device *device)
|
||||
struct hidraw_devinfo info;
|
||||
int fd, res;
|
||||
const char *devnode;
|
||||
struct input_id hid_id;
|
||||
|
||||
if (!device->udev_hidraw)
|
||||
return -EINVAL;
|
||||
@@ -59,18 +58,6 @@ ratbag_open_hidraw(struct ratbag_device *device)
|
||||
goto err;
|
||||
}
|
||||
|
||||
hid_id.bustype = info.bustype;
|
||||
hid_id.vendor = info.vendor;
|
||||
hid_id.product = info.product;
|
||||
|
||||
/* Check if the device actually matches the input node */
|
||||
if (hid_id.bustype != device->ids.bustype ||
|
||||
hid_id.vendor != device->ids.vendor ||
|
||||
hid_id.product != device->ids.product) {
|
||||
errno = EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
device->hidraw_fd = fd;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user