Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[sfrench/cifs-2.6.git] / drivers / hid / usbhid / hid-core.c
index 705a43cdeea4251d89b8585f37b4c098cc4fe1b7..42bdd83444c1db874b259416bdf47ce81c6c3f58 100644 (file)
@@ -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));