X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=drivers%2Fhid%2Fusbhid%2Fhid-core.c;h=42bdd83444c1db874b259416bdf47ce81c6c3f58;hb=ecc96e79202ed7225f7a2e2b7cb5a9e09fc74aa6;hp=705a43cdeea4251d89b8585f37b4c098cc4fe1b7;hpb=a1a739c56ad031b8bf8b3804f568ac88899f8dd7;p=firefly-linux-kernel-4.4.55.git diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 705a43cdeea4..42bdd83444c1 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));