aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2012-04-23 06:07:04 -0400
committerJiri Kosina <jkosina@suse.cz>2012-05-01 06:54:54 -0400
commit7431fb767d896b7f0048039f2e17707ea057d35a (patch)
tree447b273a486a8855a0d88e905b0dde1b1c38feae /scripts
parent734c660931095ae165c0db6ff60558fc4173bfd0 (diff)
HID: Allow bus wildcard matching
Most HID drivers do not need to know what bus driver is in use. A generic group driver can drive any hid device, and the device list should not need to be duplicated for each new bus. This patch adds wildcard matching to the HID bus, simplifying device list handling for group drivers. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/file2alias.c3
1 files changed, 2 insertions, 1 deletions
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);