A number of HID drivers already call hid_is_using_ll_driver() but only for the detection of if this is a USB device or not. Make this more obvious by creating hid_is_usb() and calling the function that way. Also converts the existing hid_is_using_ll_driver() functions to use the new call.
Showing the changes to include/linux (1 of 6 files). Show all
Unified · Split
| @@ -840,6 +840,11 @@ static inline bool hid_is_using_ll_driver(struct hid_device *hdev, · 839 unmodified lines | ||
| 840 | 840 | return hdev->ll_driver == driver; |
| 841 | 841 | } |
| 842 | 842 | |
| 843 | +static inline bool hid_is_usb(struct hid_device *hdev) | |
| 844 | +{ | |
| 845 | + return hid_is_using_ll_driver(hdev, &usb_hid_driver); | |
| 846 | +} | |
| 847 | + | |
| 843 | 848 | #define PM_HINT_FULLON 1<<5 |
| 844 | 849 | #define PM_HINT_NORMAL 1<<1 |
| 845 | 850 | |