aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-axff.c
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>2013-02-25 05:31:46 -0500
committerJiri Kosina <jkosina@suse.cz>2013-02-25 07:26:41 -0500
commitd881427253da011495f4193663d809d0e9dfa215 (patch)
treefe4eb817ab712f7049b1d3ef675fec69d9207675 /drivers/hid/hid-axff.c
parentf3757cea18fadce23c95a4c4bc3123af73a95e65 (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-axff.c')
-rw-r--r--drivers/hid/hid-axff.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/hid/hid-axff.c b/drivers/hid/hid-axff.c
index 62f0cee032ba..64ab94a55aa7 100644
--- a/drivers/hid/hid-axff.c
+++ b/drivers/hid/hid-axff.c
@@ -29,14 +29,12 @@
29 29
30#include <linux/input.h> 30#include <linux/input.h>
31#include <linux/slab.h> 31#include <linux/slab.h>
32#include <linux/usb.h>
33#include <linux/hid.h> 32#include <linux/hid.h>
34#include <linux/module.h> 33#include <linux/module.h>
35 34
36#include "hid-ids.h" 35#include "hid-ids.h"
37 36
38#ifdef CONFIG_HID_ACRUX_FF 37#ifdef CONFIG_HID_ACRUX_FF
39#include "usbhid/usbhid.h"
40 38
41struct axff_device { 39struct axff_device {
42 struct hid_report *report; 40 struct hid_report *report;
@@ -68,7 +66,7 @@ static int axff_play(struct input_dev *dev, void *data, struct ff_effect *effect
68 } 66 }
69 67
70 dbg_hid("running with 0x%02x 0x%02x", left, right); 68 dbg_hid("running with 0x%02x 0x%02x", left, right);
71 usbhid_submit_report(hid, axff->report, USB_DIR_OUT); 69 hid_hw_request(hid, axff->report, HID_REQ_SET_REPORT);
72 70
73 return 0; 71 return 0;
74} 72}
@@ -114,7 +112,7 @@ static int axff_init(struct hid_device *hid)
114 goto err_free_mem; 112 goto err_free_mem;
115 113
116 axff->report = report; 114 axff->report = report;
117 usbhid_submit_report(hid, axff->report, USB_DIR_OUT); 115 hid_hw_request(hid, axff->report, HID_REQ_SET_REPORT);
118 116
119 hid_info(hid, "Force Feedback for ACRUX game controllers by Sergei Kolzun <x0r@dv-life.ru>\n"); 117 hid_info(hid, "Force Feedback for ACRUX game controllers by Sergei Kolzun <x0r@dv-life.ru>\n");
120 118