Skip to content

Commit c241c5e

Browse files
bentissJiri Kosina
authored andcommitted
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent afdb5cc commit c241c5e

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

drivers/hid/hid-core.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -779,23 +779,20 @@ static int hid_scan_report(struct hid_device *hid)
779779
(hid->group == HID_GROUP_MULTITOUCH))
780780
hid->group = HID_GROUP_MULTITOUCH_WIN_8;
781781

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-
792782
/*
793783
* Vendor specific handlings
794784
*/
795785
switch (hid->vendor) {
796786
case USB_VENDOR_ID_WACOM:
797787
hid->group = HID_GROUP_WACOM;
798788
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;
799796
}
800797

801798
vfree(parser);

include/linux/hid.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,6 @@ struct hid_item {
312312
* Vendor specific HID device groups
313313
*/
314314
#define HID_GROUP_RMI 0x0100
315-
316-
/*
317-
* Vendor specific HID device groups
318-
*/
319315
#define HID_GROUP_WACOM 0x0101
320316

321317
/*

0 commit comments

Comments
 (0)