mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
c241c5eea8
commit
9578f41aea
1 changed files with 2 additions and 1 deletions
|
@ -2535,7 +2535,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);
|
||||
|
|
Loading…
Add table
Reference in a new issue