From 6ab11a058569f242f2354fb5d79b75f317570fb0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 24 Aug 2015 11:53:12 +1000 Subject: [PATCH] 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 --- src/libratbag-hidraw.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/libratbag-hidraw.c b/src/libratbag-hidraw.c index 0cbf5ebb..18948c75 100644 --- a/src/libratbag-hidraw.c +++ b/src/libratbag-hidraw.c @@ -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;