mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
HID: add hid_type to general hid struct
Add type to the hid structure to distinguish to which device type (now only mouse) we are talking to. Needed for per device type ignore list support. Note: this patch leaves the type as unknown for bluetooth devices, there is not support for this in the hidp code. Signed-off-by: Jiri Slaby <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
ac2d98998c
commit
a73a63701f
2 changed files with 9 additions and 0 deletions
|
|
@ -972,6 +972,9 @@ static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
|||
hid->vendor = le16_to_cpu(dev->descriptor.idVendor);
|
||||
hid->product = le16_to_cpu(dev->descriptor.idProduct);
|
||||
hid->name[0] = 0;
|
||||
if (intf->cur_altsetting->desc.bInterfaceProtocol ==
|
||||
USB_INTERFACE_PROTOCOL_MOUSE)
|
||||
hid->type = HID_TYPE_USBMOUSE;
|
||||
|
||||
if (dev->manufacturer)
|
||||
strlcpy(hid->name, dev->manufacturer, sizeof(hid->name));
|
||||
|
|
|
|||
Loading…
Reference in a new issue