summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-10-22 14:45:11 +0200
committerJiri Kosina <jkosina@suse.cz>2008-10-22 14:45:11 +0200
commita73a63701f8f23e70674b3c5e367a0a726c18468 (patch)
tree7ea08c39cdef5c53986898b3ea66a8f531725447 /drivers/hid
parentac2d98998c32fcdc8d8919b7a4536a7945fd0422 (diff)
downloadlinux-3.10-a73a63701f8f23e70674b3c5e367a0a726c18468.tar.gz
linux-3.10-a73a63701f8f23e70674b3c5e367a0a726c18468.tar.bz2
linux-3.10-a73a63701f8f23e70674b3c5e367a0a726c18468.zip
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 <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/usbhid/hid-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 1d3b8a394d4..1dc341a04d0 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -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));