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-emsff.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-emsff.c')
-rw-r--r-- | drivers/hid/hid-emsff.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/hid/hid-emsff.c b/drivers/hid/hid-emsff.c index 2e093ab99b43..d82d75bb11f7 100644 --- a/drivers/hid/hid-emsff.c +++ b/drivers/hid/hid-emsff.c | |||
@@ -23,11 +23,9 @@ | |||
23 | 23 | ||
24 | #include <linux/hid.h> | 24 | #include <linux/hid.h> |
25 | #include <linux/input.h> | 25 | #include <linux/input.h> |
26 | #include <linux/usb.h> | ||
27 | #include <linux/module.h> | 26 | #include <linux/module.h> |
28 | 27 | ||
29 | #include "hid-ids.h" | 28 | #include "hid-ids.h" |
30 | #include "usbhid/usbhid.h" | ||
31 | 29 | ||
32 | struct emsff_device { | 30 | struct emsff_device { |
33 | struct hid_report *report; | 31 | struct hid_report *report; |
@@ -52,7 +50,7 @@ static int emsff_play(struct input_dev *dev, void *data, | |||
52 | emsff->report->field[0]->value[2] = strong; | 50 | emsff->report->field[0]->value[2] = strong; |
53 | 51 | ||
54 | dbg_hid("running with 0x%02x 0x%02x\n", strong, weak); | 52 | dbg_hid("running with 0x%02x 0x%02x\n", strong, weak); |
55 | usbhid_submit_report(hid, emsff->report, USB_DIR_OUT); | 53 | hid_hw_request(hid, emsff->report, HID_REQ_SET_REPORT); |
56 | 54 | ||
57 | return 0; | 55 | return 0; |
58 | } | 56 | } |
@@ -104,7 +102,7 @@ static int emsff_init(struct hid_device *hid) | |||
104 | emsff->report->field[0]->value[4] = 0x00; | 102 | emsff->report->field[0]->value[4] = 0x00; |
105 | emsff->report->field[0]->value[5] = 0x00; | 103 | emsff->report->field[0]->value[5] = 0x00; |
106 | emsff->report->field[0]->value[6] = 0x00; | 104 | emsff->report->field[0]->value[6] = 0x00; |
107 | usbhid_submit_report(hid, emsff->report, USB_DIR_OUT); | 105 | hid_hw_request(hid, emsff->report, HID_REQ_SET_REPORT); |
108 | 106 | ||
109 | hid_info(hid, "force feedback for EMS based devices by Ignaz Forster <ignaz.forster@gmx.de>\n"); | 107 | hid_info(hid, "force feedback for EMS based devices by Ignaz Forster <ignaz.forster@gmx.de>\n"); |
110 | 108 | ||