diff options
author | Benjamin Tissoires <benjamin.tissoires@gmail.com> | 2013-02-25 05:31:46 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-02-25 07:26:41 -0500 |
commit | d881427253da011495f4193663d809d0e9dfa215 (patch) | |
tree | fe4eb817ab712f7049b1d3ef675fec69d9207675 /drivers/hid/hid-lenovo-tpkbd.c | |
parent | f3757cea18fadce23c95a4c4bc3123af73a95e65 (diff) |
HID: use hid_hw_request() instead of direct call to usbhid
This allows the hid drivers to be independent from the transport layer.
The patch was constructed by replacing all occurences of
usbhid_submit_report() by its hid_hw_request() counterpart.
Then, drivers not requiring USB_HID anymore have their USB_HID
dependency cleaned in the Kconfig file.
Finally, few drivers still depends on USB_HID. Many of them
are requiring the io wait callback. They are found in the next patch.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
For the sensor-hub part:
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-lenovo-tpkbd.c')
-rw-r--r-- | drivers/hid/hid-lenovo-tpkbd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-lenovo-tpkbd.c b/drivers/hid/hid-lenovo-tpkbd.c index 956c3b135f64..a0535fd7a798 100644 --- a/drivers/hid/hid-lenovo-tpkbd.c +++ b/drivers/hid/hid-lenovo-tpkbd.c | |||
@@ -68,7 +68,7 @@ static int tpkbd_features_set(struct hid_device *hdev) | |||
68 | report->field[2]->value[0] = data_pointer->sensitivity; | 68 | report->field[2]->value[0] = data_pointer->sensitivity; |
69 | report->field[3]->value[0] = data_pointer->press_speed; | 69 | report->field[3]->value[0] = data_pointer->press_speed; |
70 | 70 | ||
71 | usbhid_submit_report(hdev, report, USB_DIR_OUT); | 71 | hid_hw_request(hdev, report, HID_REQ_SET_REPORT); |
72 | return 0; | 72 | return 0; |
73 | } | 73 | } |
74 | 74 | ||
@@ -332,7 +332,7 @@ static void tpkbd_led_brightness_set(struct led_classdev *led_cdev, | |||
332 | report = hdev->report_enum[HID_OUTPUT_REPORT].report_id_hash[3]; | 332 | report = hdev->report_enum[HID_OUTPUT_REPORT].report_id_hash[3]; |
333 | report->field[0]->value[0] = (data_pointer->led_state >> 0) & 1; | 333 | report->field[0]->value[0] = (data_pointer->led_state >> 0) & 1; |
334 | report->field[0]->value[1] = (data_pointer->led_state >> 1) & 1; | 334 | report->field[0]->value[1] = (data_pointer->led_state >> 1) & 1; |
335 | usbhid_submit_report(hdev, report, USB_DIR_OUT); | 335 | hid_hw_request(hdev, report, HID_REQ_SET_REPORT); |
336 | } | 336 | } |
337 | 337 | ||
338 | static int tpkbd_probe_tp(struct hid_device *hdev) | 338 | static int tpkbd_probe_tp(struct hid_device *hdev) |