Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15d4c430 authored by Benjamin Tissoires's avatar Benjamin Tissoires Committed by Sasha Levin
Browse files

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: default avatarBenjamin Tisssoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 8f021777
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);