Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117852
b: refs/heads/master
c: a73a637
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Slaby authored and Jiri Kosina committed Oct 22, 2008
1 parent 62e1a3a commit f7dd766
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ac2d98998c32fcdc8d8919b7a4536a7945fd0422
refs/heads/master: a73a63701f8f23e70674b3c5e367a0a726c18468
3 changes: 3 additions & 0 deletions trunk/drivers/hid/usbhid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/hid.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,11 @@ struct hid_input {
struct input_dev *input;
};

enum hid_type {
HID_TYPE_OTHER = 0,
HID_TYPE_USBMOUSE
};

struct hid_driver;
struct hid_ll_driver;

Expand All @@ -431,6 +436,7 @@ struct hid_device { /* device report descriptor */
__u32 vendor; /* Vendor ID */
__u32 product; /* Product ID */
__u32 version; /* HID version */
enum hid_type type; /* device type (mouse, kbd, ...) */
unsigned country; /* HID country */
struct hid_report_enum report_enum[HID_REPORT_TYPES];

Expand Down

0 comments on commit f7dd766

Please sign in to comment.