]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
HID: fix merge from wacom into the HID tree
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Tue, 30 Sep 2014 17:18:23 +0000 (13:18 -0400)
committerJiri Kosina <jkosina@suse.cz>
Wed, 29 Oct 2014 09:49:23 +0000 (10:49 +0100)
While merging wacom from the input to the hid tree, some
comments have been duplicated. We can also integrate the
test for Synaptics devices in the switch case below, so
it is clear that there will be only one place for such
quirks.

No functional changes are expected in this commit.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c
include/linux/hid.h

index 73bd9e2e42bc3c7dfbd249c0a1d3d4e1c78a19f9..aef7c56ca5e72e65e92e3b6954d880aa4e83cd7a 100644 (file)
@@ -779,16 +779,6 @@ static int hid_scan_report(struct hid_device *hid)
            (hid->group == HID_GROUP_MULTITOUCH))
                hid->group = HID_GROUP_MULTITOUCH_WIN_8;
 
-       /*
-       * Vendor specific handlings
-       */
-       if ((hid->vendor == USB_VENDOR_ID_SYNAPTICS) &&
-           (hid->group == HID_GROUP_GENERIC) &&
-           /* only bind to the mouse interface of composite USB devices */
-           (hid->bus != BUS_USB || hid->type == HID_TYPE_USBMOUSE))
-               /* hid-rmi should take care of them, not hid-generic */
-               hid->group = HID_GROUP_RMI;
-
        /*
         * Vendor specific handlings
         */
@@ -796,6 +786,13 @@ static int hid_scan_report(struct hid_device *hid)
        case USB_VENDOR_ID_WACOM:
                hid->group = HID_GROUP_WACOM;
                break;
+       case USB_VENDOR_ID_SYNAPTICS:
+               if ((hid->group == HID_GROUP_GENERIC) &&
+                   (hid->bus != BUS_USB || hid->type == HID_TYPE_USBMOUSE))
+                       /* hid-rmi should only bind to the mouse interface of
+                        * composite USB devices */
+                       hid->group = HID_GROUP_RMI;
+               break;
        }
 
        vfree(parser);
index 78ea9bf941cd3352def7eaff6f26304beb1e2f7e..5b1ff6110e256388a3f170f64ad4d9b78c686654 100644 (file)
@@ -312,10 +312,6 @@ struct hid_item {
  * Vendor specific HID device groups
  */
 #define HID_GROUP_RMI                          0x0100
-
-/*
- * Vendor specific HID device groups
- */
 #define HID_GROUP_WACOM                                0x0101
 
 /*