diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2023-02-22 10:27:57 +0100 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2023-02-22 10:27:57 +0100 |
commit | 06db2af35e5f44cebf36c1dc122f5769f630d2f8 (patch) | |
tree | 02830ad872b359dc6972b1c85bbc66b03d283653 /drivers/hid/usbhid | |
parent | Merge tag 'for-linus-2023020901' of git://git.kernel.org/pub/scm/linux/kernel... (diff) | |
parent | HID: use standard debug APIs (diff) | |
download | linux-06db2af35e5f44cebf36c1dc122f5769f630d2f8.tar.xz linux-06db2af35e5f44cebf36c1dc122f5769f630d2f8.zip |
Merge branch 'for-6.3/hid-core' into for-linus
- constify hid_ll_driver (Thomas Weißschuh)
- map standard Battery System Charging to upower (José Expósito)
- couple of assorted fixes and new handling of HID usages (Jingyuan
Liang & Ronald Tschalär)
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index be4c731aaa65..257dd73e37bf 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -1318,7 +1318,7 @@ static bool usbhid_may_wakeup(struct hid_device *hid) return device_may_wakeup(&dev->dev); } -struct hid_ll_driver usb_hid_driver = { +static const struct hid_ll_driver usb_hid_driver = { .parse = usbhid_parse, .start = usbhid_start, .stop = usbhid_stop, @@ -1332,7 +1332,12 @@ struct hid_ll_driver usb_hid_driver = { .idle = usbhid_idle, .may_wakeup = usbhid_may_wakeup, }; -EXPORT_SYMBOL_GPL(usb_hid_driver); + +bool hid_is_usb(const struct hid_device *hdev) +{ + return hdev->ll_driver == &usb_hid_driver; +} +EXPORT_SYMBOL_GPL(hid_is_usb); static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *id) { |