Skip to content

Commit

Permalink
HID: fix merge from wacom into the HID tree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Benjamin Tissoires authored and Jiri Kosina committed Oct 29, 2014
1 parent afdb5cc commit c241c5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
17 changes: 7 additions & 10 deletions drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,23 +779,20 @@ 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
*/
switch (hid->vendor) {
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);
Expand Down
4 changes: 0 additions & 4 deletions include/linux/hid.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*
Expand Down

0 comments on commit c241c5e

Please sign in to comment.