diff options
author | Benjamin Tissoires <benjamin.tissoires@gmail.com> | 2013-02-25 14:31:46 +0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-02-25 16:26:41 +0400 |
commit | d881427253da011495f4193663d809d0e9dfa215 (patch) | |
tree | fe4eb817ab712f7049b1d3ef675fec69d9207675 /drivers/hid/hid-lg2ff.c | |
parent | f3757cea18fadce23c95a4c4bc3123af73a95e65 (diff) | |
download | linux-d881427253da011495f4193663d809d0e9dfa215.tar.xz |
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 @@ #include <linux/input.h> #include <linux/slab.h> -#include <linux/usb.h> #include <linux/hid.h> -#include "usbhid/usbhid.h" #include "hid-lg.h" struct lg2ff_device { @@ -56,7 +54,7 @@ static int play_effect(struct input_dev *dev, void *data, lg2ff->report->field[0]->value[4] = 0x00; } - usbhid_submit_report(hid, lg2ff->report, USB_DIR_OUT); + hid_hw_request(hid, lg2ff->report, HID_REQ_SET_REPORT); return 0; } @@ -108,7 +106,7 @@ int lg2ff_init(struct hid_device *hid) report->field[0]->value[5] = 0x00; report->field[0]->value[6] = 0x00; - usbhid_submit_report(hid, report, USB_DIR_OUT); + hid_hw_request(hid, report, HID_REQ_SET_REPORT); hid_info(hid, "Force feedback for Logitech RumblePad/Rumblepad 2 by Anssi Hannula <anssi.hannula@gmail.com>\n"); |