aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2014-09-30 13:18:23 -0400
committerJiri Kosina <jkosina@suse.cz>2014-10-29 05:49:23 -0400
commitc241c5eea822344639898512780cff823fc7d730 (patch)
tree6022a4549a79bf64e22cec4ee524a3b382afba66
parentafdb5cce979b7d3100d58bdce70c8be6093a8915 (diff)
HID: fix merge from wacom into the HID tree
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>
-rw-r--r--drivers/hid/hid-core.c17
-rw-r--r--include/linux/hid.h4
2 files changed, 7 insertions, 14 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 73bd9e2e42bc..aef7c56ca5e7 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -780,22 +780,19 @@ static int hid_scan_report(struct hid_device *hid)
780 hid->group = HID_GROUP_MULTITOUCH_WIN_8; 780 hid->group = HID_GROUP_MULTITOUCH_WIN_8;
781 781
782 /* 782 /*
783 * Vendor specific handlings
784 */
785 if ((hid->vendor == USB_VENDOR_ID_SYNAPTICS) &&
786 (hid->group == HID_GROUP_GENERIC) &&
787 /* only bind to the mouse interface of composite USB devices */
788 (hid->bus != BUS_USB || hid->type == HID_TYPE_USBMOUSE))
789 /* hid-rmi should take care of them, not hid-generic */
790 hid->group = HID_GROUP_RMI;
791
792 /*
793 * Vendor specific handlings 783 * Vendor specific handlings
794 */ 784 */
795 switch (hid->vendor) { 785 switch (hid->vendor) {
796 case USB_VENDOR_ID_WACOM: 786 case USB_VENDOR_ID_WACOM:
797 hid->group = HID_GROUP_WACOM; 787 hid->group = HID_GROUP_WACOM;
798 break; 788 break;
789 case USB_VENDOR_ID_SYNAPTICS:
790 if ((hid->group == HID_GROUP_GENERIC) &&
791 (hid->bus != BUS_USB || hid->type == HID_TYPE_USBMOUSE))
792 /* hid-rmi should only bind to the mouse interface of
793 * composite USB devices */
794 hid->group = HID_GROUP_RMI;
795 break;
799 } 796 }
800 797
801 vfree(parser); 798 vfree(parser);
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 78ea9bf941cd..5b1ff6110e25 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -312,10 +312,6 @@ struct hid_item {
312 * Vendor specific HID device groups 312 * Vendor specific HID device groups
313 */ 313 */
314#define HID_GROUP_RMI 0x0100 314#define HID_GROUP_RMI 0x0100
315
316/*
317 * Vendor specific HID device groups
318 */
319#define HID_GROUP_WACOM 0x0101 315#define HID_GROUP_WACOM 0x0101
320 316
321/* 317/*