From 8c3e24065e3d37ee4787e6c72aa0ab6460db7598 Mon Sep 17 00:00:00 2001 From: Thomas Weißschuh Date: Thu, 22 Dec 2022 05:10:45 +0000 Subject: HID: usbhid: Make hid_is_usb() non-inline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By making hid_is_usb() a non-inline function the lowlevel usbhid driver does not have to be exported anymore. Also mark the argument as const as it is not modified. Signed-off-by: Thomas Weißschuh Reviewed-by: David Rheinsberg Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina --- drivers/hid/usbhid/hid-core.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/hid/usbhid/hid-core.c') diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index be4c731aaa65..54b0280d0073 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -1334,6 +1334,12 @@ struct hid_ll_driver usb_hid_driver = { }; 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) { struct usb_host_interface *interface = intf->cur_altsetting; -- cgit v1.2.3