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>
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index 59d29f8..ca749810 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -18,7 +18,6 @@
*/
#include <linux/device.h>
#include <linux/hid.h>
-#include "usbhid/usbhid.h"
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/mfd/core.h>
@@ -204,7 +203,7 @@
}
hid_set_field(report->field[field_index], 0, value);
hid_hw_request(hsdev->hdev, report, HID_REQ_SET_REPORT);
- usbhid_wait_io(hsdev->hdev);
+ hid_hw_wait(hsdev->hdev);
done_proc:
mutex_unlock(&data->mutex);
@@ -227,7 +226,7 @@
goto done_proc;
}
hid_hw_request(hsdev->hdev, report, HID_REQ_GET_REPORT);
- usbhid_wait_io(hsdev->hdev);
+ hid_hw_wait(hsdev->hdev);
*value = report->field[field_index]->value[0];
done_proc: