diff options
author | Benjamin Tissoires <benjamin.tissoires@gmail.com> | 2013-02-25 05:31:47 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-02-25 07:26:41 -0500 |
commit | b7966a4d7be0a10329f03330390f4bdaf453d74a (patch) | |
tree | 73e1456d2199e16edf22af60929507ae25cff281 /drivers/hid/hid-sensor-hub.c | |
parent | d881427253da011495f4193663d809d0e9dfa215 (diff) |
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>
Diffstat (limited to 'drivers/hid/hid-sensor-hub.c')
-rw-r--r-- | drivers/hid/hid-sensor-hub.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index 59d29f853ac0..ca7498107327 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c | |||
@@ -18,7 +18,6 @@ | |||
18 | */ | 18 | */ |
19 | #include <linux/device.h> | 19 | #include <linux/device.h> |
20 | #include <linux/hid.h> | 20 | #include <linux/hid.h> |
21 | #include "usbhid/usbhid.h" | ||
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
23 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
24 | #include <linux/mfd/core.h> | 23 | #include <linux/mfd/core.h> |
@@ -204,7 +203,7 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, | |||
204 | } | 203 | } |
205 | hid_set_field(report->field[field_index], 0, value); | 204 | hid_set_field(report->field[field_index], 0, value); |
206 | hid_hw_request(hsdev->hdev, report, HID_REQ_SET_REPORT); | 205 | hid_hw_request(hsdev->hdev, report, HID_REQ_SET_REPORT); |
207 | usbhid_wait_io(hsdev->hdev); | 206 | hid_hw_wait(hsdev->hdev); |
208 | 207 | ||
209 | done_proc: | 208 | done_proc: |
210 | mutex_unlock(&data->mutex); | 209 | mutex_unlock(&data->mutex); |
@@ -227,7 +226,7 @@ int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, | |||
227 | goto done_proc; | 226 | goto done_proc; |
228 | } | 227 | } |
229 | hid_hw_request(hsdev->hdev, report, HID_REQ_GET_REPORT); | 228 | hid_hw_request(hsdev->hdev, report, HID_REQ_GET_REPORT); |
230 | usbhid_wait_io(hsdev->hdev); | 229 | hid_hw_wait(hsdev->hdev); |
231 | *value = report->field[field_index]->value[0]; | 230 | *value = report->field[field_index]->value[0]; |
232 | 231 | ||
233 | done_proc: | 232 | done_proc: |