提交 9578f41a 编写于 作者: B Benjamin Tissoires 提交者: Jiri Kosina

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: NBenjamin Tisssoires <benjamin.tissoires@redhat.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 c241c5ee
...@@ -2535,7 +2535,8 @@ int hid_add_device(struct hid_device *hdev) ...@@ -2535,7 +2535,8 @@ int hid_add_device(struct hid_device *hdev)
* Scan generic devices for group information * Scan generic devices for group information
*/ */
if (hid_ignore_special_drivers || 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); ret = hid_scan_report(hdev);
if (ret) if (ret)
hid_warn(hdev, "bad device descriptor (%d)\n", ret); hid_warn(hdev, "bad device descriptor (%d)\n", ret);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册