mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 07:50:04 +00:00
HID: usbhid: Make hid_is_usb() non-inline
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 <linux@weissschuh.net> Reviewed-by: David Rheinsberg <david.rheinsberg@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
2bafbef6ff
commit
8c3e24065e
@ -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;
|
||||
|
@ -866,10 +866,7 @@ static inline bool hid_is_using_ll_driver(struct hid_device *hdev,
|
||||
return hdev->ll_driver == driver;
|
||||
}
|
||||
|
||||
static inline bool hid_is_usb(struct hid_device *hdev)
|
||||
{
|
||||
return hid_is_using_ll_driver(hdev, &usb_hid_driver);
|
||||
}
|
||||
extern bool hid_is_usb(const struct hid_device *hdev);
|
||||
|
||||
#define PM_HINT_FULLON 1<<5
|
||||
#define PM_HINT_NORMAL 1<<1
|
||||
|
Loading…
x
Reference in New Issue
Block a user