diff options
-rw-r--r-- | drivers/hid/hid-core.c | 2 | ||||
-rw-r--r-- | include/linux/mod_devicetable.h | 1 | ||||
-rw-r--r-- | scripts/mod/file2alias.c | 3 |
3 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index f932cd533d49..20daee56d325 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1273,7 +1273,7 @@ EXPORT_SYMBOL_GPL(hid_input_report); | |||
1273 | static bool hid_match_one_id(struct hid_device *hdev, | 1273 | static bool hid_match_one_id(struct hid_device *hdev, |
1274 | const struct hid_device_id *id) | 1274 | const struct hid_device_id *id) |
1275 | { | 1275 | { |
1276 | return id->bus == hdev->bus && | 1276 | return (id->bus == HID_BUS_ANY || id->bus == hdev->bus) && |
1277 | (id->group == HID_GROUP_ANY || id->group == hdev->group) && | 1277 | (id->group == HID_GROUP_ANY || id->group == hdev->group) && |
1278 | (id->vendor == HID_ANY_ID || id->vendor == hdev->vendor) && | 1278 | (id->vendor == HID_ANY_ID || id->vendor == hdev->vendor) && |
1279 | (id->product == HID_ANY_ID || id->product == hdev->product); | 1279 | (id->product == HID_ANY_ID || id->product == hdev->product); |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 55ed0b0dc610..5db93821f9c7 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -132,6 +132,7 @@ struct usb_device_id { | |||
132 | #define USB_DEVICE_ID_MATCH_INT_PROTOCOL 0x0200 | 132 | #define USB_DEVICE_ID_MATCH_INT_PROTOCOL 0x0200 |
133 | 133 | ||
134 | #define HID_ANY_ID (~0) | 134 | #define HID_ANY_ID (~0) |
135 | #define HID_BUS_ANY 0xffff | ||
135 | #define HID_GROUP_ANY 0x0000 | 136 | #define HID_GROUP_ANY 0x0000 |
136 | 137 | ||
137 | struct hid_device_id { | 138 | struct hid_device_id { |
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index fe967cee7371..056de3104e75 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -340,7 +340,8 @@ static int do_hid_entry(const char *filename, | |||
340 | id->vendor = TO_NATIVE(id->vendor); | 340 | id->vendor = TO_NATIVE(id->vendor); |
341 | id->product = TO_NATIVE(id->product); | 341 | id->product = TO_NATIVE(id->product); |
342 | 342 | ||
343 | sprintf(alias, "hid:b%04X", id->bus); | 343 | sprintf(alias, "hid:"); |
344 | ADD(alias, "b", id->bus != HID_BUS_ANY, id->bus); | ||
344 | ADD(alias, "g", id->group != HID_GROUP_ANY, id->group); | 345 | ADD(alias, "g", id->group != HID_GROUP_ANY, id->group); |
345 | ADD(alias, "v", id->vendor != HID_ANY_ID, id->vendor); | 346 | ADD(alias, "v", id->vendor != HID_ANY_ID, id->vendor); |
346 | ADD(alias, "p", id->product != HID_ANY_ID, id->product); | 347 | ADD(alias, "p", id->product != HID_ANY_ID, id->product); |