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-lg2ff.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-lg2ff.c')
-rw-r--r-- | drivers/hid/hid-lg2ff.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/hid/hid-lg2ff.c b/drivers/hid/hid-lg2ff.c index 3c31bc650e5d..b3cd1507dda2 100644 --- a/drivers/hid/hid-lg2ff.c +++ b/drivers/hid/hid-lg2ff.c | |||
@@ -23,10 +23,8 @@ | |||
23 | 23 | ||
24 | #include <linux/input.h> | 24 | #include <linux/input.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/usb.h> | ||
27 | #include <linux/hid.h> | 26 | #include <linux/hid.h> |
28 | 27 | ||
29 | #include "usbhid/usbhid.h" | ||
30 | #include "hid-lg.h" | 28 | #include "hid-lg.h" |
31 | 29 | ||
32 | struct lg2ff_device { | 30 | struct lg2ff_device { |
@@ -56,7 +54,7 @@ static int play_effect(struct input_dev *dev, void *data, | |||
56 | lg2ff->report->field[0]->value[4] = 0x00; | 54 | lg2ff->report->field[0]->value[4] = 0x00; |
57 | } | 55 | } |
58 | 56 | ||
59 | usbhid_submit_report(hid, lg2ff->report, USB_DIR_OUT); | 57 | hid_hw_request(hid, lg2ff->report, HID_REQ_SET_REPORT); |
60 | return 0; | 58 | return 0; |
61 | } | 59 | } |
62 | 60 | ||
@@ -108,7 +106,7 @@ int lg2ff_init(struct hid_device *hid) | |||
108 | report->field[0]->value[5] = 0x00; | 106 | report->field[0]->value[5] = 0x00; |
109 | report->field[0]->value[6] = 0x00; | 107 | report->field[0]->value[6] = 0x00; |
110 | 108 | ||
111 | usbhid_submit_report(hid, report, USB_DIR_OUT); | 109 | hid_hw_request(hid, report, HID_REQ_SET_REPORT); |
112 | 110 | ||
113 | hid_info(hid, "Force feedback for Logitech RumblePad/Rumblepad 2 by Anssi Hannula <anssi.hannula@gmail.com>\n"); | 111 | hid_info(hid, "Force feedback for Logitech RumblePad/Rumblepad 2 by Anssi Hannula <anssi.hannula@gmail.com>\n"); |
114 | 112 | ||