mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Acked-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
734c660931
commit
7431fb767d
3 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue