diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2014-09-30 13:18:24 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-10-29 05:49:26 -0400 |
commit | 9578f41aeaee5010384f4f8484da1566e2ce4901 (patch) | |
tree | 130dfe587f69dcc6cb5d8cbc5a323f9ef3b0d093 | |
parent | c241c5eea822344639898512780cff823fc7d730 (diff) |
HID: core: do not scan reports if the group is already set
This allows the transport layer (I have in mind hid-logitech-dj and uhid)
to set the group before it is added to the hid bus. This way, it can
bypass the hid_scan_report() call, and choose in advance which driver
will handle the newly created hid device.
Signed-off-by: Benjamin Tisssoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/hid-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index aef7c56ca5e7..946540e1764d 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -2535,7 +2535,8 @@ int hid_add_device(struct hid_device *hdev) | |||
2535 | * Scan generic devices for group information | 2535 | * Scan generic devices for group information |
2536 | */ | 2536 | */ |
2537 | if (hid_ignore_special_drivers || | 2537 | if (hid_ignore_special_drivers || |
2538 | !hid_match_id(hdev, hid_have_special_driver)) { | 2538 | (!hdev->group && |
2539 | !hid_match_id(hdev, hid_have_special_driver))) { | ||
2539 | ret = hid_scan_report(hdev); | 2540 | ret = hid_scan_report(hdev); |
2540 | if (ret) | 2541 | if (ret) |
2541 | hid_warn(hdev, "bad device descriptor (%d)\n", ret); | 2542 | hid_warn(hdev, "bad device descriptor (%d)\n", ret); |