HID: use hid_hw_wait() instead of direct call to usbhid

This removes most of the dependencies between hid drivers and usbhid.

The patch was constructed by replacing all occurences of
usbhid_wait_io() by its hid_hw_wait() counterpart.
Then, drivers not requiring USB_HID anymore have their USB_HID
dependency cleaned in the Kconfig file.

As of today, few drivers are still requiring an explicit USB layer
dependency:
* ntrig (a patch is on its way)
* multitouch (one patch following and another on its way)
* lenovo tpkbd
* roccat
* sony

The last three are two deeply using direct calls to the usb subsystem
to be able to be cleaned right now.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
Benjamin Tissoires
2013-02-25 11:31:47 +01:00
committed by Jiri Kosina
parent d881427253
commit b7966a4d7b
8 changed files with 18 additions and 22 deletions

View File

@@ -119,7 +119,7 @@ static inline int ntrig_get_mode(struct hid_device *hdev)
return -EINVAL;
hid_hw_request(hdev, report, HID_REQ_GET_REPORT);
usbhid_wait_io(hdev);
hid_hw_wait(hdev);
return (int)report->field[0]->value[0];
}
@@ -937,7 +937,7 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
if (report) {
/* Let the device settle to ensure the wakeup message gets
* through */
usbhid_wait_io(hdev);
hid_hw_wait(hdev);
hid_hw_request(hdev, report, HID_REQ_GET_REPORT);
/*