diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2014-09-30 13:18:24 -0400 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-04-12 09:16:25 -0400 |
commit | 15d4c43031493078c46a754543a96b67358e9940 (patch) | |
tree | ec289fd4349fcbfc6e74648ee5c0a07b1882c216 /drivers/hid | |
parent | 8f021777cd74076d941625b5341d3e3cc2679548 (diff) | |
download | linux-stable-15d4c43031493078c46a754543a96b67358e9940.tar.gz linux-stable-15d4c43031493078c46a754543a96b67358e9940.tar.bz2 linux-stable-15d4c43031493078c46a754543a96b67358e9940.zip |
HID: core: do not scan reports if the group is already set
[ Upstream commit 9578f41aeaee5010384f4f8484da1566e2ce4901 ]
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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'drivers/hid')
-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 ab52d1b30161..d144fbf6b390 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2554,7 +2554,8 @@ int hid_add_device(struct hid_device *hdev) * Scan generic devices for group information */ if (hid_ignore_special_drivers || - !hid_match_id(hdev, hid_have_special_driver)) { + (!hdev->group && + !hid_match_id(hdev, hid_have_special_driver))) { ret = hid_scan_report(hdev); if (ret) hid_warn(hdev, "bad device descriptor (%d)\n", ret); |