Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305029
b: refs/heads/master
c: 7431fb7
h: refs/heads/master
i:
  305027: 6936c12
v: v3
  • Loading branch information
Henrik Rydberg authored and Jiri Kosina committed May 1, 2012
1 parent bddbca6 commit 55643a9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 734c660931095ae165c0db6ff60558fc4173bfd0
refs/heads/master: 7431fb767d896b7f0048039f2e17707ea057d35a
2 changes: 1 addition & 1 deletion trunk/drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ EXPORT_SYMBOL_GPL(hid_input_report);
static bool hid_match_one_id(struct hid_device *hdev,
const struct hid_device_id *id)
{
return id->bus == hdev->bus &&
return (id->bus == HID_BUS_ANY || id->bus == hdev->bus) &&
(id->group == HID_GROUP_ANY || id->group == hdev->group) &&
(id->vendor == HID_ANY_ID || id->vendor == hdev->vendor) &&
(id->product == HID_ANY_ID || id->product == hdev->product);
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/mod_devicetable.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ struct usb_device_id {
#define USB_DEVICE_ID_MATCH_INT_PROTOCOL 0x0200

#define HID_ANY_ID (~0)
#define HID_BUS_ANY 0xffff
#define HID_GROUP_ANY 0x0000

struct hid_device_id {
Expand Down
3 changes: 2 additions & 1 deletion trunk/scripts/mod/file2alias.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ static int do_hid_entry(const char *filename,
id->vendor = TO_NATIVE(id->vendor);
id->product = TO_NATIVE(id->product);

sprintf(alias, "hid:b%04X", id->bus);
sprintf(alias, "hid:");
ADD(alias, "b", id->bus != HID_BUS_ANY, id->bus);
ADD(alias, "g", id->group != HID_GROUP_ANY, id->group);
ADD(alias, "v", id->vendor != HID_ANY_ID, id->vendor);
ADD(alias, "p", id->product != HID_ANY_ID, id->product);
Expand Down

0 comments on commit 55643a9

Please sign in to comment.