1
0
forked from drath/libratbag

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:
Peter Hutterer
2015-08-24 11:53:12 +10:00
parent 3782b37853
commit 6ab11a0585

View File

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