[PATCH v2 6/6] HID: asus: Switch to the new hid_is_usb_device() helper
From: Hans de Goede <hidden>
Date: 2021-05-05 21:40:13
Subsystem:
hid core layer, the rest · Maintainers:
Jiri Kosina, Benjamin Tissoires, Linus Torvalds
Switch to the new hid_is_usb_device() helper. With this new helper building without USB_HID being enabled should work, so also change the Kconfig depends on from USB_HID to plain HID. Signed-off-by: Hans de Goede <redacted> --- drivers/hid/Kconfig | 2 +- drivers/hid/hid-asus.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 786b71ef7738..6b244e67c272 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig@@ -149,7 +149,7 @@ config HID_APPLEIR config HID_ASUS tristate "Asus" - depends on USB_HID + depends on HID depends on LEDS_CLASS depends on ASUS_WMI || ASUS_WMI=n select POWER_SUPPLY
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index 6e24f48f211c..41bc34aaaf09 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c@@ -1009,8 +1009,7 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id) if (drvdata->quirks & QUIRK_IS_MULTITOUCH) drvdata->tp = &asus_i2c_tp; - if ((drvdata->quirks & QUIRK_T100_KEYBOARD) && - hid_is_using_ll_driver(hdev, &usb_hid_driver)) { + if ((drvdata->quirks & QUIRK_T100_KEYBOARD) && hid_is_usb_device(hdev)) { struct usb_interface *intf = to_usb_interface(hdev->dev.parent); if (intf->altsetting->desc.bInterfaceNumber == T100_TPAD_INTF) {
@@ -1038,8 +1037,7 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id) drvdata->tp = &asus_t100chi_tp; } - if ((drvdata->quirks & QUIRK_MEDION_E1239T) && - hid_is_using_ll_driver(hdev, &usb_hid_driver)) { + if ((drvdata->quirks & QUIRK_MEDION_E1239T) && hid_is_usb_device(hdev)) { struct usb_host_interface *alt = to_usb_interface(hdev->dev.parent)->altsetting;
--
2.31.1