aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
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
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')
-rw-r--r--drivers/hid/Kconfig30
-rw-r--r--drivers/hid/hid-axff.c6
-rw-r--r--drivers/hid/hid-dr.c8
-rw-r--r--drivers/hid/hid-emsff.c6
-rw-r--r--drivers/hid/hid-gaff.c10
-rw-r--r--drivers/hid/hid-holtekff.c4
-rw-r--r--drivers/hid/hid-kye.c4
-rw-r--r--drivers/hid/hid-lenovo-tpkbd.c4
-rw-r--r--drivers/hid/hid-lg2ff.c6
-rw-r--r--drivers/hid/hid-lg3ff.c6
-rw-r--r--drivers/hid/hid-lg4ff.c18
-rw-r--r--drivers/hid/hid-lgff.c8
-rw-r--r--drivers/hid/hid-logitech-dj.c3
-rw-r--r--drivers/hid/hid-multitouch.c4
-rw-r--r--drivers/hid/hid-ntrig.c6
-rw-r--r--drivers/hid/hid-picolcd.h4
-rw-r--r--drivers/hid/hid-picolcd_backlight.c4
-rw-r--r--drivers/hid/hid-picolcd_cir.c2
-rw-r--r--drivers/hid/hid-picolcd_core.c8
-rw-r--r--drivers/hid/hid-picolcd_debugfs.c2
-rw-r--r--drivers/hid/hid-picolcd_fb.c7
-rw-r--r--drivers/hid/hid-picolcd_lcd.c4
-rw-r--r--drivers/hid/hid-picolcd_leds.c4
-rw-r--r--drivers/hid/hid-pl.c6
-rw-r--r--drivers/hid/hid-prodikeys.c3
-rw-r--r--drivers/hid/hid-sensor-hub.c7
-rw-r--r--drivers/hid/hid-sjoy.c6
-rw-r--r--drivers/hid/hid-steelseries.c3
-rw-r--r--drivers/hid/hid-tmff.c6
-rw-r--r--drivers/hid/hid-zpff.c6
-rw-r--r--drivers/hid/usbhid/hid-core.c3
-rw-r--r--drivers/hid/usbhid/hid-pidff.c64
-rw-r--r--drivers/hid/usbhid/hiddev.c4
-rw-r--r--drivers/hid/usbhid/usbhid.h2
34 files changed, 111 insertions, 157 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 1b737b44c56e..f0acf2754b69 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -99,7 +99,7 @@ config HID_A4TECH
99 99
100config HID_ACRUX 100config HID_ACRUX
101 tristate "ACRUX game controller support" 101 tristate "ACRUX game controller support"
102 depends on USB_HID 102 depends on HID
103 ---help--- 103 ---help---
104 Say Y here if you want to enable support for ACRUX game controllers. 104 Say Y here if you want to enable support for ACRUX game controllers.
105 105
@@ -151,7 +151,7 @@ config HID_CHICONY
151 151
152config HID_PRODIKEYS 152config HID_PRODIKEYS
153 tristate "Prodikeys PC-MIDI Keyboard support" 153 tristate "Prodikeys PC-MIDI Keyboard support"
154 depends on USB_HID && SND 154 depends on HID && SND
155 select SND_RAWMIDI 155 select SND_RAWMIDI
156 ---help--- 156 ---help---
157 Support for Prodikeys PC-MIDI Keyboard device support. 157 Support for Prodikeys PC-MIDI Keyboard device support.
@@ -173,7 +173,7 @@ config HID_CYPRESS
173 173
174config HID_DRAGONRISE 174config HID_DRAGONRISE
175 tristate "DragonRise Inc. game controller" 175 tristate "DragonRise Inc. game controller"
176 depends on USB_HID 176 depends on HID
177 ---help--- 177 ---help---
178 Say Y here if you have DragonRise Inc. game controllers. 178 Say Y here if you have DragonRise Inc. game controllers.
179 These might be branded as: 179 These might be branded as:
@@ -192,7 +192,7 @@ config DRAGONRISE_FF
192 192
193config HID_EMS_FF 193config HID_EMS_FF
194 tristate "EMS Production Inc. force feedback support" 194 tristate "EMS Production Inc. force feedback support"
195 depends on USB_HID 195 depends on HID
196 select INPUT_FF_MEMLESS 196 select INPUT_FF_MEMLESS
197 ---help--- 197 ---help---
198 Say Y here if you want to enable force feedback support for devices by 198 Say Y here if you want to enable force feedback support for devices by
@@ -215,7 +215,7 @@ config HID_EZKEY
215 215
216config HID_HOLTEK 216config HID_HOLTEK
217 tristate "Holtek HID devices" 217 tristate "Holtek HID devices"
218 depends on USB_HID 218 depends on HID
219 ---help--- 219 ---help---
220 Support for Holtek based devices: 220 Support for Holtek based devices:
221 - Holtek On Line Grip based game controller 221 - Holtek On Line Grip based game controller
@@ -239,7 +239,7 @@ config HID_KEYTOUCH
239 239
240config HID_KYE 240config HID_KYE
241 tristate "KYE/Genius devices" 241 tristate "KYE/Genius devices"
242 depends on USB_HID 242 depends on HID
243 ---help--- 243 ---help---
244 Support for KYE/Genius devices not fully compliant with HID standard: 244 Support for KYE/Genius devices not fully compliant with HID standard:
245 - Ergo Mouse 245 - Ergo Mouse
@@ -397,7 +397,7 @@ config HID_MONTEREY
397 397
398config HID_MULTITOUCH 398config HID_MULTITOUCH
399 tristate "HID Multitouch panels" 399 tristate "HID Multitouch panels"
400 depends on USB_HID 400 depends on HID
401 ---help--- 401 ---help---
402 Generic support for HID multitouch panels. 402 Generic support for HID multitouch panels.
403 403
@@ -458,7 +458,7 @@ config HID_ORTEK
458 458
459config HID_PANTHERLORD 459config HID_PANTHERLORD
460 tristate "Pantherlord/GreenAsia game controller" 460 tristate "Pantherlord/GreenAsia game controller"
461 depends on USB_HID 461 depends on HID
462 ---help--- 462 ---help---
463 Say Y here if you have a PantherLord/GreenAsia based game controller 463 Say Y here if you have a PantherLord/GreenAsia based game controller
464 or adapter. 464 or adapter.
@@ -592,13 +592,13 @@ config HID_SONY
592 592
593config HID_SPEEDLINK 593config HID_SPEEDLINK
594 tristate "Speedlink VAD Cezanne mouse support" 594 tristate "Speedlink VAD Cezanne mouse support"
595 depends on USB_HID 595 depends on HID
596 ---help--- 596 ---help---
597 Support for Speedlink Vicious and Divine Cezanne mouse. 597 Support for Speedlink Vicious and Divine Cezanne mouse.
598 598
599config HID_STEELSERIES 599config HID_STEELSERIES
600 tristate "Steelseries SRW-S1 steering wheel support" 600 tristate "Steelseries SRW-S1 steering wheel support"
601 depends on USB_HID 601 depends on HID
602 ---help--- 602 ---help---
603 Support for Steelseries SRW-S1 steering wheel 603 Support for Steelseries SRW-S1 steering wheel
604 604
@@ -610,7 +610,7 @@ config HID_SUNPLUS
610 610
611config HID_GREENASIA 611config HID_GREENASIA
612 tristate "GreenAsia (Product ID 0x12) game controller support" 612 tristate "GreenAsia (Product ID 0x12) game controller support"
613 depends on USB_HID 613 depends on HID
614 ---help--- 614 ---help---
615 Say Y here if you have a GreenAsia (Product ID 0x12) based game 615 Say Y here if you have a GreenAsia (Product ID 0x12) based game
616 controller or adapter. 616 controller or adapter.
@@ -632,7 +632,7 @@ config HID_HYPERV_MOUSE
632 632
633config HID_SMARTJOYPLUS 633config HID_SMARTJOYPLUS
634 tristate "SmartJoy PLUS PS2/USB adapter support" 634 tristate "SmartJoy PLUS PS2/USB adapter support"
635 depends on USB_HID 635 depends on HID
636 ---help--- 636 ---help---
637 Support for SmartJoy PLUS PS2/USB adapter, Super Dual Box, 637 Support for SmartJoy PLUS PS2/USB adapter, Super Dual Box,
638 Super Joy Box 3 Pro, Super Dual Box Pro, and Super Joy Box 5 Pro. 638 Super Joy Box 3 Pro, Super Dual Box Pro, and Super Joy Box 5 Pro.
@@ -673,7 +673,7 @@ config HID_THINGM
673 673
674config HID_THRUSTMASTER 674config HID_THRUSTMASTER
675 tristate "ThrustMaster devices support" 675 tristate "ThrustMaster devices support"
676 depends on USB_HID 676 depends on HID
677 ---help--- 677 ---help---
678 Say Y here if you have a THRUSTMASTER FireStore Dual Power 2 or 678 Say Y here if you have a THRUSTMASTER FireStore Dual Power 2 or
679 a THRUSTMASTER Ferrari GT Rumble Wheel. 679 a THRUSTMASTER Ferrari GT Rumble Wheel.
@@ -715,7 +715,7 @@ config HID_WIIMOTE_EXT
715 715
716config HID_ZEROPLUS 716config HID_ZEROPLUS
717 tristate "Zeroplus based game controller support" 717 tristate "Zeroplus based game controller support"
718 depends on USB_HID 718 depends on HID
719 ---help--- 719 ---help---
720 Say Y here if you have a Zeroplus based game controller. 720 Say Y here if you have a Zeroplus based game controller.
721 721
@@ -735,7 +735,7 @@ config HID_ZYDACRON
735 735
736config HID_SENSOR_HUB 736config HID_SENSOR_HUB
737 tristate "HID Sensors framework support" 737 tristate "HID Sensors framework support"
738 depends on USB_HID && GENERIC_HARDIRQS 738 depends on HID && GENERIC_HARDIRQS
739 select MFD_CORE 739 select MFD_CORE
740 default n 740 default n
741 -- help--- 741 -- help---
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
diff --git a/drivers/hid/hid-dr.c b/drivers/hid/hid-dr.c
index 0fe8f65ef01a..ce0644424f58 100644
--- a/drivers/hid/hid-dr.c
+++ b/drivers/hid/hid-dr.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_DRAGONRISE_FF 37#ifdef CONFIG_DRAGONRISE_FF
39#include "usbhid/usbhid.h"
40 38
41struct drff_device { 39struct drff_device {
42 struct hid_report *report; 40 struct hid_report *report;
@@ -68,7 +66,7 @@ static int drff_play(struct input_dev *dev, void *data,
68 drff->report->field[0]->value[1] = 0x00; 66 drff->report->field[0]->value[1] = 0x00;
69 drff->report->field[0]->value[2] = weak; 67 drff->report->field[0]->value[2] = weak;
70 drff->report->field[0]->value[4] = strong; 68 drff->report->field[0]->value[4] = strong;
71 usbhid_submit_report(hid, drff->report, USB_DIR_OUT); 69 hid_hw_request(hid, drff->report, HID_REQ_SET_REPORT);
72 70
73 drff->report->field[0]->value[0] = 0xfa; 71 drff->report->field[0]->value[0] = 0xfa;
74 drff->report->field[0]->value[1] = 0xfe; 72 drff->report->field[0]->value[1] = 0xfe;
@@ -80,7 +78,7 @@ static int drff_play(struct input_dev *dev, void *data,
80 drff->report->field[0]->value[2] = 0x00; 78 drff->report->field[0]->value[2] = 0x00;
81 drff->report->field[0]->value[4] = 0x00; 79 drff->report->field[0]->value[4] = 0x00;
82 dbg_hid("running with 0x%02x 0x%02x", strong, weak); 80 dbg_hid("running with 0x%02x 0x%02x", strong, weak);
83 usbhid_submit_report(hid, drff->report, USB_DIR_OUT); 81 hid_hw_request(hid, drff->report, HID_REQ_SET_REPORT);
84 82
85 return 0; 83 return 0;
86} 84}
@@ -132,7 +130,7 @@ static int drff_init(struct hid_device *hid)
132 drff->report->field[0]->value[4] = 0x00; 130 drff->report->field[0]->value[4] = 0x00;
133 drff->report->field[0]->value[5] = 0x00; 131 drff->report->field[0]->value[5] = 0x00;
134 drff->report->field[0]->value[6] = 0x00; 132 drff->report->field[0]->value[6] = 0x00;
135 usbhid_submit_report(hid, drff->report, USB_DIR_OUT); 133 hid_hw_request(hid, drff->report, HID_REQ_SET_REPORT);
136 134
137 hid_info(hid, "Force Feedback for DragonRise Inc. " 135 hid_info(hid, "Force Feedback for DragonRise Inc. "
138 "game controllers by Richard Walmsley <richwalm@gmail.com>\n"); 136 "game controllers by Richard Walmsley <richwalm@gmail.com>\n");
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
32struct emsff_device { 30struct 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
diff --git a/drivers/hid/hid-gaff.c b/drivers/hid/hid-gaff.c
index 04d2e6aca778..2d8cead3adca 100644
--- a/drivers/hid/hid-gaff.c
+++ b/drivers/hid/hid-gaff.c
@@ -29,13 +29,11 @@
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#include "hid-ids.h" 34#include "hid-ids.h"
36 35
37#ifdef CONFIG_GREENASIA_FF 36#ifdef CONFIG_GREENASIA_FF
38#include "usbhid/usbhid.h"
39 37
40struct gaff_device { 38struct gaff_device {
41 struct hid_report *report; 39 struct hid_report *report;
@@ -63,14 +61,14 @@ static int hid_gaff_play(struct input_dev *dev, void *data,
63 gaff->report->field[0]->value[4] = left; 61 gaff->report->field[0]->value[4] = left;
64 gaff->report->field[0]->value[5] = 0; 62 gaff->report->field[0]->value[5] = 0;
65 dbg_hid("running with 0x%02x 0x%02x", left, right); 63 dbg_hid("running with 0x%02x 0x%02x", left, right);
66 usbhid_submit_report(hid, gaff->report, USB_DIR_OUT); 64 hid_hw_request(hid, gaff->report, HID_REQ_SET_REPORT);
67 65
68 gaff->report->field[0]->value[0] = 0xfa; 66 gaff->report->field[0]->value[0] = 0xfa;
69 gaff->report->field[0]->value[1] = 0xfe; 67 gaff->report->field[0]->value[1] = 0xfe;
70 gaff->report->field[0]->value[2] = 0x0; 68 gaff->report->field[0]->value[2] = 0x0;
71 gaff->report->field[0]->value[4] = 0x0; 69 gaff->report->field[0]->value[4] = 0x0;
72 70
73 usbhid_submit_report(hid, gaff->report, USB_DIR_OUT); 71 hid_hw_request(hid, gaff->report, HID_REQ_SET_REPORT);
74 72
75 return 0; 73 return 0;
76} 74}
@@ -122,12 +120,12 @@ static int gaff_init(struct hid_device *hid)
122 gaff->report->field[0]->value[1] = 0x00; 120 gaff->report->field[0]->value[1] = 0x00;
123 gaff->report->field[0]->value[2] = 0x00; 121 gaff->report->field[0]->value[2] = 0x00;
124 gaff->report->field[0]->value[3] = 0x00; 122 gaff->report->field[0]->value[3] = 0x00;
125 usbhid_submit_report(hid, gaff->report, USB_DIR_OUT); 123 hid_hw_request(hid, gaff->report, HID_REQ_SET_REPORT);
126 124
127 gaff->report->field[0]->value[0] = 0xfa; 125 gaff->report->field[0]->value[0] = 0xfa;
128 gaff->report->field[0]->value[1] = 0xfe; 126 gaff->report->field[0]->value[1] = 0xfe;
129 127
130 usbhid_submit_report(hid, gaff->report, USB_DIR_OUT); 128 hid_hw_request(hid, gaff->report, HID_REQ_SET_REPORT);
131 129
132 hid_info(hid, "Force Feedback for GreenAsia 0x12 devices by Lukasz Lubojanski <lukasz@lubojanski.info>\n"); 130 hid_info(hid, "Force Feedback for GreenAsia 0x12 devices by Lukasz Lubojanski <lukasz@lubojanski.info>\n");
133 131
diff --git a/drivers/hid/hid-holtekff.c b/drivers/hid/hid-holtekff.c
index f34d1186a3e1..9a8f05124525 100644
--- a/drivers/hid/hid-holtekff.c
+++ b/drivers/hid/hid-holtekff.c
@@ -27,12 +27,10 @@
27#include <linux/input.h> 27#include <linux/input.h>
28#include <linux/module.h> 28#include <linux/module.h>
29#include <linux/slab.h> 29#include <linux/slab.h>
30#include <linux/usb.h>
31 30
32#include "hid-ids.h" 31#include "hid-ids.h"
33 32
34#ifdef CONFIG_HOLTEK_FF 33#ifdef CONFIG_HOLTEK_FF
35#include "usbhid/usbhid.h"
36 34
37MODULE_LICENSE("GPL"); 35MODULE_LICENSE("GPL");
38MODULE_AUTHOR("Anssi Hannula <anssi.hannula@iki.fi>"); 36MODULE_AUTHOR("Anssi Hannula <anssi.hannula@iki.fi>");
@@ -102,7 +100,7 @@ static void holtekff_send(struct holtekff_device *holtekff,
102 100
103 dbg_hid("sending %*ph\n", 7, data); 101 dbg_hid("sending %*ph\n", 7, data);
104 102
105 usbhid_submit_report(hid, holtekff->field->report, USB_DIR_OUT); 103 hid_hw_request(hid, holtekff->field->report, HID_REQ_SET_REPORT);
106} 104}
107 105
108static int holtekff_play(struct input_dev *dev, void *data, 106static int holtekff_play(struct input_dev *dev, void *data,
diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c
index ef72daecfa16..6af90dbdc3d4 100644
--- a/drivers/hid/hid-kye.c
+++ b/drivers/hid/hid-kye.c
@@ -16,8 +16,6 @@
16#include <linux/device.h> 16#include <linux/device.h>
17#include <linux/hid.h> 17#include <linux/hid.h>
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/usb.h>
20#include "usbhid/usbhid.h"
21 19
22#include "hid-ids.h" 20#include "hid-ids.h"
23 21
@@ -361,7 +359,7 @@ static int kye_tablet_enable(struct hid_device *hdev)
361 value[4] = 0x00; 359 value[4] = 0x00;
362 value[5] = 0x00; 360 value[5] = 0x00;
363 value[6] = 0x00; 361 value[6] = 0x00;
364 usbhid_submit_report(hdev, report, USB_DIR_OUT); 362 hid_hw_request(hdev, report, HID_REQ_SET_REPORT);
365 363
366 return 0; 364 return 0;
367} 365}
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
338static int tpkbd_probe_tp(struct hid_device *hdev) 338static int tpkbd_probe_tp(struct hid_device *hdev)
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
32struct lg2ff_device { 30struct 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
diff --git a/drivers/hid/hid-lg3ff.c b/drivers/hid/hid-lg3ff.c
index f98644c26c1d..e52f181f6aa1 100644
--- a/drivers/hid/hid-lg3ff.c
+++ b/drivers/hid/hid-lg3ff.c
@@ -22,10 +22,8 @@
22 22
23 23
24#include <linux/input.h> 24#include <linux/input.h>
25#include <linux/usb.h>
26#include <linux/hid.h> 25#include <linux/hid.h>
27 26
28#include "usbhid/usbhid.h"
29#include "hid-lg.h" 27#include "hid-lg.h"
30 28
31/* 29/*
@@ -92,7 +90,7 @@ static int hid_lg3ff_play(struct input_dev *dev, void *data,
92 report->field[0]->value[1] = (unsigned char)(-x); 90 report->field[0]->value[1] = (unsigned char)(-x);
93 report->field[0]->value[31] = (unsigned char)(-y); 91 report->field[0]->value[31] = (unsigned char)(-y);
94 92
95 usbhid_submit_report(hid, report, USB_DIR_OUT); 93 hid_hw_request(hid, report, HID_REQ_SET_REPORT);
96 break; 94 break;
97 } 95 }
98 return 0; 96 return 0;
@@ -118,7 +116,7 @@ static void hid_lg3ff_set_autocenter(struct input_dev *dev, u16 magnitude)
118 report->field[0]->value[33] = 0x7F; 116 report->field[0]->value[33] = 0x7F;
119 report->field[0]->value[34] = 0x7F; 117 report->field[0]->value[34] = 0x7F;
120 118
121 usbhid_submit_report(hid, report, USB_DIR_OUT); 119 hid_hw_request(hid, report, HID_REQ_SET_REPORT);
122} 120}
123 121
124 122
diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c
index 65a6ec8d3742..7da40a1797cd 100644
--- a/drivers/hid/hid-lg4ff.c
+++ b/drivers/hid/hid-lg4ff.c
@@ -202,7 +202,7 @@ static int hid_lg4ff_play(struct input_dev *dev, void *data, struct ff_effect *e
202 value[5] = 0x00; 202 value[5] = 0x00;
203 value[6] = 0x00; 203 value[6] = 0x00;
204 204
205 usbhid_submit_report(hid, report, USB_DIR_OUT); 205 hid_hw_request(hid, report, HID_REQ_SET_REPORT);
206 break; 206 break;
207 } 207 }
208 return 0; 208 return 0;
@@ -225,7 +225,7 @@ static void hid_lg4ff_set_autocenter_default(struct input_dev *dev, u16 magnitud
225 value[5] = 0x00; 225 value[5] = 0x00;
226 value[6] = 0x00; 226 value[6] = 0x00;
227 227
228 usbhid_submit_report(hid, report, USB_DIR_OUT); 228 hid_hw_request(hid, report, HID_REQ_SET_REPORT);
229} 229}
230 230
231/* Sends autocentering command compatible with Formula Force EX */ 231/* Sends autocentering command compatible with Formula Force EX */
@@ -245,7 +245,7 @@ static void hid_lg4ff_set_autocenter_ffex(struct input_dev *dev, u16 magnitude)
245 value[5] = 0x00; 245 value[5] = 0x00;
246 value[6] = 0x00; 246 value[6] = 0x00;
247 247
248 usbhid_submit_report(hid, report, USB_DIR_OUT); 248 hid_hw_request(hid, report, HID_REQ_SET_REPORT);
249} 249}
250 250
251/* Sends command to set range compatible with G25/G27/Driving Force GT */ 251/* Sends command to set range compatible with G25/G27/Driving Force GT */
@@ -265,7 +265,7 @@ static void hid_lg4ff_set_range_g25(struct hid_device *hid, u16 range)
265 value[5] = 0x00; 265 value[5] = 0x00;
266 value[6] = 0x00; 266 value[6] = 0x00;
267 267
268 usbhid_submit_report(hid, report, USB_DIR_OUT); 268 hid_hw_request(hid, report, HID_REQ_SET_REPORT);
269} 269}
270 270
271/* Sends commands to set range compatible with Driving Force Pro wheel */ 271/* Sends commands to set range compatible with Driving Force Pro wheel */
@@ -294,7 +294,7 @@ static void hid_lg4ff_set_range_dfp(struct hid_device *hid, __u16 range)
294 report->field[0]->value[1] = 0x02; 294 report->field[0]->value[1] = 0x02;
295 full_range = 200; 295 full_range = 200;
296 } 296 }
297 usbhid_submit_report(hid, report, USB_DIR_OUT); 297 hid_hw_request(hid, report, HID_REQ_SET_REPORT);
298 298
299 /* Prepare "fine" limit command */ 299 /* Prepare "fine" limit command */
300 value[0] = 0x81; 300 value[0] = 0x81;
@@ -306,7 +306,7 @@ static void hid_lg4ff_set_range_dfp(struct hid_device *hid, __u16 range)
306 value[6] = 0x00; 306 value[6] = 0x00;
307 307
308 if (range == 200 || range == 900) { /* Do not apply any fine limit */ 308 if (range == 200 || range == 900) { /* Do not apply any fine limit */
309 usbhid_submit_report(hid, report, USB_DIR_OUT); 309 hid_hw_request(hid, report, HID_REQ_SET_REPORT);
310 return; 310 return;
311 } 311 }
312 312
@@ -320,7 +320,7 @@ static void hid_lg4ff_set_range_dfp(struct hid_device *hid, __u16 range)
320 value[5] = (start_right & 0xe) << 4 | (start_left & 0xe); 320 value[5] = (start_right & 0xe) << 4 | (start_left & 0xe);
321 value[6] = 0xff; 321 value[6] = 0xff;
322 322
323 usbhid_submit_report(hid, report, USB_DIR_OUT); 323 hid_hw_request(hid, report, HID_REQ_SET_REPORT);
324} 324}
325 325
326static void hid_lg4ff_switch_native(struct hid_device *hid, const struct lg4ff_native_cmd *cmd) 326static void hid_lg4ff_switch_native(struct hid_device *hid, const struct lg4ff_native_cmd *cmd)
@@ -334,7 +334,7 @@ static void hid_lg4ff_switch_native(struct hid_device *hid, const struct lg4ff_n
334 for (i = 0; i < 7; i++) 334 for (i = 0; i < 7; i++)
335 report->field[0]->value[i] = cmd->cmd[j++]; 335 report->field[0]->value[i] = cmd->cmd[j++];
336 336
337 usbhid_submit_report(hid, report, USB_DIR_OUT); 337 hid_hw_request(hid, report, HID_REQ_SET_REPORT);
338 } 338 }
339} 339}
340 340
@@ -410,7 +410,7 @@ static void lg4ff_set_leds(struct hid_device *hid, __u8 leds)
410 value[4] = 0x00; 410 value[4] = 0x00;
411 value[5] = 0x00; 411 value[5] = 0x00;
412 value[6] = 0x00; 412 value[6] = 0x00;
413 usbhid_submit_report(hid, report, USB_DIR_OUT); 413 hid_hw_request(hid, report, HID_REQ_SET_REPORT);
414} 414}
415 415
416static void lg4ff_led_set_brightness(struct led_classdev *led_cdev, 416static void lg4ff_led_set_brightness(struct led_classdev *led_cdev,
diff --git a/drivers/hid/hid-lgff.c b/drivers/hid/hid-lgff.c
index 27bc54f92f44..d7ea8c845b40 100644
--- a/drivers/hid/hid-lgff.c
+++ b/drivers/hid/hid-lgff.c
@@ -30,10 +30,8 @@
30#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 30#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
31 31
32#include <linux/input.h> 32#include <linux/input.h>
33#include <linux/usb.h>
34#include <linux/hid.h> 33#include <linux/hid.h>
35 34
36#include "usbhid/usbhid.h"
37#include "hid-lg.h" 35#include "hid-lg.h"
38 36
39struct dev_type { 37struct dev_type {
@@ -89,7 +87,7 @@ static int hid_lgff_play(struct input_dev *dev, void *data, struct ff_effect *ef
89 report->field[0]->value[2] = x; 87 report->field[0]->value[2] = x;
90 report->field[0]->value[3] = y; 88 report->field[0]->value[3] = y;
91 dbg_hid("(x, y)=(%04x, %04x)\n", x, y); 89 dbg_hid("(x, y)=(%04x, %04x)\n", x, y);
92 usbhid_submit_report(hid, report, USB_DIR_OUT); 90 hid_hw_request(hid, report, HID_REQ_SET_REPORT);
93 break; 91 break;
94 92
95 case FF_RUMBLE: 93 case FF_RUMBLE:
@@ -104,7 +102,7 @@ static int hid_lgff_play(struct input_dev *dev, void *data, struct ff_effect *ef
104 report->field[0]->value[2] = left; 102 report->field[0]->value[2] = left;
105 report->field[0]->value[3] = right; 103 report->field[0]->value[3] = right;
106 dbg_hid("(left, right)=(%04x, %04x)\n", left, right); 104 dbg_hid("(left, right)=(%04x, %04x)\n", left, right);
107 usbhid_submit_report(hid, report, USB_DIR_OUT); 105 hid_hw_request(hid, report, HID_REQ_SET_REPORT);
108 break; 106 break;
109 } 107 }
110 return 0; 108 return 0;
@@ -124,7 +122,7 @@ static void hid_lgff_set_autocenter(struct input_dev *dev, u16 magnitude)
124 *value++ = 0x80; 122 *value++ = 0x80;
125 *value++ = 0x00; 123 *value++ = 0x00;
126 *value = 0x00; 124 *value = 0x00;
127 usbhid_submit_report(hid, report, USB_DIR_OUT); 125 hid_hw_request(hid, report, HID_REQ_SET_REPORT);
128} 126}
129 127
130int lgff_init(struct hid_device* hid) 128int lgff_init(struct hid_device* hid)
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 9500f2f3f8fe..3cf62be2ca5d 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -27,7 +27,6 @@
27#include <linux/module.h> 27#include <linux/module.h>
28#include <linux/usb.h> 28#include <linux/usb.h>
29#include <asm/unaligned.h> 29#include <asm/unaligned.h>
30#include "usbhid/usbhid.h"
31#include "hid-ids.h" 30#include "hid-ids.h"
32#include "hid-logitech-dj.h" 31#include "hid-logitech-dj.h"
33 32
@@ -638,7 +637,7 @@ static int logi_dj_ll_input_event(struct input_dev *dev, unsigned int type,
638 hid_set_field(report->field[0], 1, REPORT_TYPE_LEDS); 637 hid_set_field(report->field[0], 1, REPORT_TYPE_LEDS);
639 hid_set_field(report->field[0], 2, data[1]); 638 hid_set_field(report->field[0], 2, data[1]);
640 639
641 usbhid_submit_report(dj_rcv_hiddev, report, USB_DIR_OUT); 640 hid_hw_request(dj_rcv_hiddev, report, HID_REQ_SET_REPORT);
642 641
643 return 0; 642 return 0;
644 643
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 7a1ebb867cf4..32258ba60056 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -736,7 +736,7 @@ static void mt_set_input_mode(struct hid_device *hdev)
736 r = re->report_id_hash[td->inputmode]; 736 r = re->report_id_hash[td->inputmode];
737 if (r) { 737 if (r) {
738 r->field[0]->value[td->inputmode_index] = 0x02; 738 r->field[0]->value[td->inputmode_index] = 0x02;
739 usbhid_submit_report(hdev, r, USB_DIR_OUT); 739 hid_hw_request(hdev, r, HID_REQ_SET_REPORT);
740 } 740 }
741} 741}
742 742
@@ -761,7 +761,7 @@ static void mt_set_maxcontacts(struct hid_device *hdev)
761 max = min(fieldmax, max); 761 max = min(fieldmax, max);
762 if (r->field[0]->value[0] != max) { 762 if (r->field[0]->value[0] != max) {
763 r->field[0]->value[0] = max; 763 r->field[0]->value[0] = max;
764 usbhid_submit_report(hdev, r, USB_DIR_OUT); 764 hid_hw_request(hdev, r, HID_REQ_SET_REPORT);
765 } 765 }
766 } 766 }
767} 767}
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index 7757e82416e7..b926592e6c16 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -118,7 +118,7 @@ static inline int ntrig_get_mode(struct hid_device *hdev)
118 if (!report) 118 if (!report)
119 return -EINVAL; 119 return -EINVAL;
120 120
121 usbhid_submit_report(hdev, report, USB_DIR_IN); 121 hid_hw_request(hdev, report, HID_REQ_GET_REPORT);
122 usbhid_wait_io(hdev); 122 usbhid_wait_io(hdev);
123 return (int)report->field[0]->value[0]; 123 return (int)report->field[0]->value[0];
124} 124}
@@ -137,7 +137,7 @@ static inline void ntrig_set_mode(struct hid_device *hdev, const int mode)
137 if (!report) 137 if (!report)
138 return; 138 return;
139 139
140 usbhid_submit_report(hdev, report, USB_DIR_IN); 140 hid_hw_request(hdev, report, HID_REQ_GET_REPORT);
141} 141}
142 142
143static void ntrig_report_version(struct hid_device *hdev) 143static void ntrig_report_version(struct hid_device *hdev)
@@ -938,7 +938,7 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
938 /* Let the device settle to ensure the wakeup message gets 938 /* Let the device settle to ensure the wakeup message gets
939 * through */ 939 * through */
940 usbhid_wait_io(hdev); 940 usbhid_wait_io(hdev);
941 usbhid_submit_report(hdev, report, USB_DIR_IN); 941 hid_hw_request(hdev, report, HID_REQ_GET_REPORT);
942 942
943 /* 943 /*
944 * Sanity check: if the current mode is invalid reset it to 944 * Sanity check: if the current mode is invalid reset it to
diff --git a/drivers/hid/hid-picolcd.h b/drivers/hid/hid-picolcd.h
index 020cef69f6a1..2941891ecac2 100644
--- a/drivers/hid/hid-picolcd.h
+++ b/drivers/hid/hid-picolcd.h
@@ -142,10 +142,10 @@ struct hid_report *picolcd_report(int id, struct hid_device *hdev, int dir);
142#ifdef CONFIG_DEBUG_FS 142#ifdef CONFIG_DEBUG_FS
143void picolcd_debug_out_report(struct picolcd_data *data, 143void picolcd_debug_out_report(struct picolcd_data *data,
144 struct hid_device *hdev, struct hid_report *report); 144 struct hid_device *hdev, struct hid_report *report);
145#define usbhid_submit_report(a, b, c) \ 145#define hid_hw_request(a, b, c) \
146 do { \ 146 do { \
147 picolcd_debug_out_report(hid_get_drvdata(a), a, b); \ 147 picolcd_debug_out_report(hid_get_drvdata(a), a, b); \
148 usbhid_submit_report(a, b, c); \ 148 hid_hw_request(a, b, c); \
149 } while (0) 149 } while (0)
150 150
151void picolcd_debug_raw_event(struct picolcd_data *data, 151void picolcd_debug_raw_event(struct picolcd_data *data,
diff --git a/drivers/hid/hid-picolcd_backlight.c b/drivers/hid/hid-picolcd_backlight.c
index b91f30945f9c..a32c5f86b0b3 100644
--- a/drivers/hid/hid-picolcd_backlight.c
+++ b/drivers/hid/hid-picolcd_backlight.c
@@ -18,8 +18,6 @@
18 ***************************************************************************/ 18 ***************************************************************************/
19 19
20#include <linux/hid.h> 20#include <linux/hid.h>
21#include "usbhid/usbhid.h"
22#include <linux/usb.h>
23 21
24#include <linux/fb.h> 22#include <linux/fb.h>
25#include <linux/backlight.h> 23#include <linux/backlight.h>
@@ -46,7 +44,7 @@ static int picolcd_set_brightness(struct backlight_device *bdev)
46 spin_lock_irqsave(&data->lock, flags); 44 spin_lock_irqsave(&data->lock, flags);
47 hid_set_field(report->field[0], 0, data->lcd_power == FB_BLANK_UNBLANK ? data->lcd_brightness : 0); 45 hid_set_field(report->field[0], 0, data->lcd_power == FB_BLANK_UNBLANK ? data->lcd_brightness : 0);
48 if (!(data->status & PICOLCD_FAILED)) 46 if (!(data->status & PICOLCD_FAILED))
49 usbhid_submit_report(data->hdev, report, USB_DIR_OUT); 47 hid_hw_request(data->hdev, report, HID_REQ_SET_REPORT);
50 spin_unlock_irqrestore(&data->lock, flags); 48 spin_unlock_irqrestore(&data->lock, flags);
51 return 0; 49 return 0;
52} 50}
diff --git a/drivers/hid/hid-picolcd_cir.c b/drivers/hid/hid-picolcd_cir.c
index a79e95bb9fb6..e346038f0f11 100644
--- a/drivers/hid/hid-picolcd_cir.c
+++ b/drivers/hid/hid-picolcd_cir.c
@@ -21,8 +21,6 @@
21#include <linux/hid-debug.h> 21#include <linux/hid-debug.h>
22#include <linux/input.h> 22#include <linux/input.h>
23#include "hid-ids.h" 23#include "hid-ids.h"
24#include "usbhid/usbhid.h"
25#include <linux/usb.h>
26 24
27#include <linux/fb.h> 25#include <linux/fb.h>
28#include <linux/vmalloc.h> 26#include <linux/vmalloc.h>
diff --git a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c
index 31cd93fc3d4b..b48092d0e139 100644
--- a/drivers/hid/hid-picolcd_core.c
+++ b/drivers/hid/hid-picolcd_core.c
@@ -21,8 +21,6 @@
21#include <linux/hid-debug.h> 21#include <linux/hid-debug.h>
22#include <linux/input.h> 22#include <linux/input.h>
23#include "hid-ids.h" 23#include "hid-ids.h"
24#include "usbhid/usbhid.h"
25#include <linux/usb.h>
26 24
27#include <linux/fb.h> 25#include <linux/fb.h>
28#include <linux/vmalloc.h> 26#include <linux/vmalloc.h>
@@ -110,7 +108,7 @@ struct picolcd_pending *picolcd_send_and_wait(struct hid_device *hdev,
110 work = NULL; 108 work = NULL;
111 } else { 109 } else {
112 data->pending = work; 110 data->pending = work;
113 usbhid_submit_report(data->hdev, report, USB_DIR_OUT); 111 hid_hw_request(data->hdev, report, HID_REQ_SET_REPORT);
114 spin_unlock_irqrestore(&data->lock, flags); 112 spin_unlock_irqrestore(&data->lock, flags);
115 wait_for_completion_interruptible_timeout(&work->ready, HZ*2); 113 wait_for_completion_interruptible_timeout(&work->ready, HZ*2);
116 spin_lock_irqsave(&data->lock, flags); 114 spin_lock_irqsave(&data->lock, flags);
@@ -244,7 +242,7 @@ int picolcd_reset(struct hid_device *hdev)
244 spin_unlock_irqrestore(&data->lock, flags); 242 spin_unlock_irqrestore(&data->lock, flags);
245 return -ENODEV; 243 return -ENODEV;
246 } 244 }
247 usbhid_submit_report(hdev, report, USB_DIR_OUT); 245 hid_hw_request(hdev, report, HID_REQ_SET_REPORT);
248 spin_unlock_irqrestore(&data->lock, flags); 246 spin_unlock_irqrestore(&data->lock, flags);
249 247
250 error = picolcd_check_version(hdev); 248 error = picolcd_check_version(hdev);
@@ -303,7 +301,7 @@ static ssize_t picolcd_operation_mode_store(struct device *dev,
303 spin_lock_irqsave(&data->lock, flags); 301 spin_lock_irqsave(&data->lock, flags);
304 hid_set_field(report->field[0], 0, timeout & 0xff); 302 hid_set_field(report->field[0], 0, timeout & 0xff);
305 hid_set_field(report->field[0], 1, (timeout >> 8) & 0xff); 303 hid_set_field(report->field[0], 1, (timeout >> 8) & 0xff);
306 usbhid_submit_report(data->hdev, report, USB_DIR_OUT); 304 hid_hw_request(data->hdev, report, HID_REQ_SET_REPORT);
307 spin_unlock_irqrestore(&data->lock, flags); 305 spin_unlock_irqrestore(&data->lock, flags);
308 return count; 306 return count;
309} 307}
diff --git a/drivers/hid/hid-picolcd_debugfs.c b/drivers/hid/hid-picolcd_debugfs.c
index 4809aa1bdb9c..59ab8e157e6b 100644
--- a/drivers/hid/hid-picolcd_debugfs.c
+++ b/drivers/hid/hid-picolcd_debugfs.c
@@ -19,8 +19,6 @@
19 19
20#include <linux/hid.h> 20#include <linux/hid.h>
21#include <linux/hid-debug.h> 21#include <linux/hid-debug.h>
22#include "usbhid/usbhid.h"
23#include <linux/usb.h>
24 22
25#include <linux/fb.h> 23#include <linux/fb.h>
26#include <linux/seq_file.h> 24#include <linux/seq_file.h>
diff --git a/drivers/hid/hid-picolcd_fb.c b/drivers/hid/hid-picolcd_fb.c
index eb003574b634..98f61de9a5e0 100644
--- a/drivers/hid/hid-picolcd_fb.c
+++ b/drivers/hid/hid-picolcd_fb.c
@@ -20,7 +20,6 @@
20#include <linux/hid.h> 20#include <linux/hid.h>
21#include <linux/vmalloc.h> 21#include <linux/vmalloc.h>
22#include "usbhid/usbhid.h" 22#include "usbhid/usbhid.h"
23#include <linux/usb.h>
24 23
25#include <linux/fb.h> 24#include <linux/fb.h>
26#include <linux/module.h> 25#include <linux/module.h>
@@ -143,8 +142,8 @@ static int picolcd_fb_send_tile(struct picolcd_data *data, u8 *vbitmap,
143 else 142 else
144 hid_set_field(report2->field[0], 4 + i - 32, tdata[i]); 143 hid_set_field(report2->field[0], 4 + i - 32, tdata[i]);
145 144
146 usbhid_submit_report(data->hdev, report1, USB_DIR_OUT); 145 hid_hw_request(data->hdev, report1, HID_REQ_SET_REPORT);
147 usbhid_submit_report(data->hdev, report2, USB_DIR_OUT); 146 hid_hw_request(data->hdev, report2, HID_REQ_SET_REPORT);
148 spin_unlock_irqrestore(&data->lock, flags); 147 spin_unlock_irqrestore(&data->lock, flags);
149 return 0; 148 return 0;
150} 149}
@@ -214,7 +213,7 @@ int picolcd_fb_reset(struct picolcd_data *data, int clear)
214 hid_set_field(report->field[0], j, mapcmd[j]); 213 hid_set_field(report->field[0], j, mapcmd[j]);
215 else 214 else
216 hid_set_field(report->field[0], j, 0); 215 hid_set_field(report->field[0], j, 0);
217 usbhid_submit_report(data->hdev, report, USB_DIR_OUT); 216 hid_hw_request(data->hdev, report, HID_REQ_SET_REPORT);
218 } 217 }
219 spin_unlock_irqrestore(&data->lock, flags); 218 spin_unlock_irqrestore(&data->lock, flags);
220 219
diff --git a/drivers/hid/hid-picolcd_lcd.c b/drivers/hid/hid-picolcd_lcd.c
index 2d0ddc5ac65f..89821c2da6d7 100644
--- a/drivers/hid/hid-picolcd_lcd.c
+++ b/drivers/hid/hid-picolcd_lcd.c
@@ -18,8 +18,6 @@
18 ***************************************************************************/ 18 ***************************************************************************/
19 19
20#include <linux/hid.h> 20#include <linux/hid.h>
21#include "usbhid/usbhid.h"
22#include <linux/usb.h>
23 21
24#include <linux/fb.h> 22#include <linux/fb.h>
25#include <linux/lcd.h> 23#include <linux/lcd.h>
@@ -48,7 +46,7 @@ static int picolcd_set_contrast(struct lcd_device *ldev, int contrast)
48 spin_lock_irqsave(&data->lock, flags); 46 spin_lock_irqsave(&data->lock, flags);
49 hid_set_field(report->field[0], 0, data->lcd_contrast); 47 hid_set_field(report->field[0], 0, data->lcd_contrast);
50 if (!(data->status & PICOLCD_FAILED)) 48 if (!(data->status & PICOLCD_FAILED))
51 usbhid_submit_report(data->hdev, report, USB_DIR_OUT); 49 hid_hw_request(data->hdev, report, HID_REQ_SET_REPORT);
52 spin_unlock_irqrestore(&data->lock, flags); 50 spin_unlock_irqrestore(&data->lock, flags);
53 return 0; 51 return 0;
54} 52}
diff --git a/drivers/hid/hid-picolcd_leds.c b/drivers/hid/hid-picolcd_leds.c
index 28cb6a4f9634..e994f9c29012 100644
--- a/drivers/hid/hid-picolcd_leds.c
+++ b/drivers/hid/hid-picolcd_leds.c
@@ -21,8 +21,6 @@
21#include <linux/hid-debug.h> 21#include <linux/hid-debug.h>
22#include <linux/input.h> 22#include <linux/input.h>
23#include "hid-ids.h" 23#include "hid-ids.h"
24#include "usbhid/usbhid.h"
25#include <linux/usb.h>
26 24
27#include <linux/fb.h> 25#include <linux/fb.h>
28#include <linux/vmalloc.h> 26#include <linux/vmalloc.h>
@@ -55,7 +53,7 @@ void picolcd_leds_set(struct picolcd_data *data)
55 spin_lock_irqsave(&data->lock, flags); 53 spin_lock_irqsave(&data->lock, flags);
56 hid_set_field(report->field[0], 0, data->led_state); 54 hid_set_field(report->field[0], 0, data->led_state);
57 if (!(data->status & PICOLCD_FAILED)) 55 if (!(data->status & PICOLCD_FAILED))
58 usbhid_submit_report(data->hdev, report, USB_DIR_OUT); 56 hid_hw_request(data->hdev, report, HID_REQ_SET_REPORT);
59 spin_unlock_irqrestore(&data->lock, flags); 57 spin_unlock_irqrestore(&data->lock, flags);
60} 58}
61 59
diff --git a/drivers/hid/hid-pl.c b/drivers/hid/hid-pl.c
index b0199d27787b..d29112fa5cd5 100644
--- a/drivers/hid/hid-pl.c
+++ b/drivers/hid/hid-pl.c
@@ -43,13 +43,11 @@
43#include <linux/input.h> 43#include <linux/input.h>
44#include <linux/slab.h> 44#include <linux/slab.h>
45#include <linux/module.h> 45#include <linux/module.h>
46#include <linux/usb.h>
47#include <linux/hid.h> 46#include <linux/hid.h>
48 47
49#include "hid-ids.h" 48#include "hid-ids.h"
50 49
51#ifdef CONFIG_PANTHERLORD_FF 50#ifdef CONFIG_PANTHERLORD_FF
52#include "usbhid/usbhid.h"
53 51
54struct plff_device { 52struct plff_device {
55 struct hid_report *report; 53 struct hid_report *report;
@@ -75,7 +73,7 @@ static int hid_plff_play(struct input_dev *dev, void *data,
75 *plff->strong = left; 73 *plff->strong = left;
76 *plff->weak = right; 74 *plff->weak = right;
77 debug("running with 0x%02x 0x%02x", left, right); 75 debug("running with 0x%02x 0x%02x", left, right);
78 usbhid_submit_report(hid, plff->report, USB_DIR_OUT); 76 hid_hw_request(hid, plff->report, HID_REQ_SET_REPORT);
79 77
80 return 0; 78 return 0;
81} 79}
@@ -169,7 +167,7 @@ static int plff_init(struct hid_device *hid)
169 167
170 *strong = 0x00; 168 *strong = 0x00;
171 *weak = 0x00; 169 *weak = 0x00;
172 usbhid_submit_report(hid, plff->report, USB_DIR_OUT); 170 hid_hw_request(hid, plff->report, HID_REQ_SET_REPORT);
173 } 171 }
174 172
175 hid_info(hid, "Force feedback for PantherLord/GreenAsia devices by Anssi Hannula <anssi.hannula@gmail.com>\n"); 173 hid_info(hid, "Force feedback for PantherLord/GreenAsia devices by Anssi Hannula <anssi.hannula@gmail.com>\n");
diff --git a/drivers/hid/hid-prodikeys.c b/drivers/hid/hid-prodikeys.c
index 4e1c4bcbdc03..7ed828056414 100644
--- a/drivers/hid/hid-prodikeys.c
+++ b/drivers/hid/hid-prodikeys.c
@@ -26,7 +26,6 @@
26#include <sound/core.h> 26#include <sound/core.h>
27#include <sound/initval.h> 27#include <sound/initval.h>
28#include <sound/rawmidi.h> 28#include <sound/rawmidi.h>
29#include "usbhid/usbhid.h"
30#include "hid-ids.h" 29#include "hid-ids.h"
31 30
32 31
@@ -306,7 +305,7 @@ static void pcmidi_submit_output_report(struct pcmidi_snd *pm, int state)
306 report->field[0]->value[0] = 0x01; 305 report->field[0]->value[0] = 0x01;
307 report->field[0]->value[1] = state; 306 report->field[0]->value[1] = state;
308 307
309 usbhid_submit_report(hdev, report, USB_DIR_OUT); 308 hid_hw_request(hdev, report, HID_REQ_SET_REPORT);
310} 309}
311 310
312static int pcmidi_handle_report1(struct pcmidi_snd *pm, u8 *data) 311static int pcmidi_handle_report1(struct pcmidi_snd *pm, u8 *data)
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index 6679788bf75a..59d29f853ac0 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -18,7 +18,6 @@
18 */ 18 */
19#include <linux/device.h> 19#include <linux/device.h>
20#include <linux/hid.h> 20#include <linux/hid.h>
21#include <linux/usb.h>
22#include "usbhid/usbhid.h" 21#include "usbhid/usbhid.h"
23#include <linux/module.h> 22#include <linux/module.h>
24#include <linux/slab.h> 23#include <linux/slab.h>
@@ -204,7 +203,7 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
204 goto done_proc; 203 goto done_proc;
205 } 204 }
206 hid_set_field(report->field[field_index], 0, value); 205 hid_set_field(report->field[field_index], 0, value);
207 usbhid_submit_report(hsdev->hdev, report, USB_DIR_OUT); 206 hid_hw_request(hsdev->hdev, report, HID_REQ_SET_REPORT);
208 usbhid_wait_io(hsdev->hdev); 207 usbhid_wait_io(hsdev->hdev);
209 208
210done_proc: 209done_proc:
@@ -227,7 +226,7 @@ int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
227 ret = -EINVAL; 226 ret = -EINVAL;
228 goto done_proc; 227 goto done_proc;
229 } 228 }
230 usbhid_submit_report(hsdev->hdev, report, USB_DIR_IN); 229 hid_hw_request(hsdev->hdev, report, HID_REQ_GET_REPORT);
231 usbhid_wait_io(hsdev->hdev); 230 usbhid_wait_io(hsdev->hdev);
232 *value = report->field[field_index]->value[0]; 231 *value = report->field[field_index]->value[0];
233 232
@@ -262,7 +261,7 @@ int sensor_hub_input_attr_get_raw_value(struct hid_sensor_hub_device *hsdev,
262 spin_unlock_irqrestore(&data->lock, flags); 261 spin_unlock_irqrestore(&data->lock, flags);
263 goto err_free; 262 goto err_free;
264 } 263 }
265 usbhid_submit_report(hsdev->hdev, report, USB_DIR_IN); 264 hid_hw_request(hsdev->hdev, report, HID_REQ_GET_REPORT);
266 spin_unlock_irqrestore(&data->lock, flags); 265 spin_unlock_irqrestore(&data->lock, flags);
267 wait_for_completion_interruptible_timeout(&data->pending.ready, HZ*5); 266 wait_for_completion_interruptible_timeout(&data->pending.ready, HZ*5);
268 switch (data->pending.raw_size) { 267 switch (data->pending.raw_size) {
diff --git a/drivers/hid/hid-sjoy.c b/drivers/hid/hid-sjoy.c
index 28f774003f03..37845eccddb5 100644
--- a/drivers/hid/hid-sjoy.c
+++ b/drivers/hid/hid-sjoy.c
@@ -28,13 +28,11 @@
28 28
29#include <linux/input.h> 29#include <linux/input.h>
30#include <linux/slab.h> 30#include <linux/slab.h>
31#include <linux/usb.h>
32#include <linux/hid.h> 31#include <linux/hid.h>
33#include <linux/module.h> 32#include <linux/module.h>
34#include "hid-ids.h" 33#include "hid-ids.h"
35 34
36#ifdef CONFIG_SMARTJOYPLUS_FF 35#ifdef CONFIG_SMARTJOYPLUS_FF
37#include "usbhid/usbhid.h"
38 36
39struct sjoyff_device { 37struct sjoyff_device {
40 struct hid_report *report; 38 struct hid_report *report;
@@ -57,7 +55,7 @@ static int hid_sjoyff_play(struct input_dev *dev, void *data,
57 sjoyff->report->field[0]->value[1] = right; 55 sjoyff->report->field[0]->value[1] = right;
58 sjoyff->report->field[0]->value[2] = left; 56 sjoyff->report->field[0]->value[2] = left;
59 dev_dbg(&dev->dev, "running with 0x%02x 0x%02x\n", left, right); 57 dev_dbg(&dev->dev, "running with 0x%02x 0x%02x\n", left, right);
60 usbhid_submit_report(hid, sjoyff->report, USB_DIR_OUT); 58 hid_hw_request(hid, sjoyff->report, HID_REQ_SET_REPORT);
61 59
62 return 0; 60 return 0;
63} 61}
@@ -115,7 +113,7 @@ static int sjoyff_init(struct hid_device *hid)
115 sjoyff->report->field[0]->value[0] = 0x01; 113 sjoyff->report->field[0]->value[0] = 0x01;
116 sjoyff->report->field[0]->value[1] = 0x00; 114 sjoyff->report->field[0]->value[1] = 0x00;
117 sjoyff->report->field[0]->value[2] = 0x00; 115 sjoyff->report->field[0]->value[2] = 0x00;
118 usbhid_submit_report(hid, sjoyff->report, USB_DIR_OUT); 116 hid_hw_request(hid, sjoyff->report, HID_REQ_SET_REPORT);
119 } 117 }
120 118
121 hid_info(hid, "Force feedback for SmartJoy PLUS PS2/USB adapter\n"); 119 hid_info(hid, "Force feedback for SmartJoy PLUS PS2/USB adapter\n");
diff --git a/drivers/hid/hid-steelseries.c b/drivers/hid/hid-steelseries.c
index 2ed995cda44a..98e66ac71842 100644
--- a/drivers/hid/hid-steelseries.c
+++ b/drivers/hid/hid-steelseries.c
@@ -16,7 +16,6 @@
16#include <linux/hid.h> 16#include <linux/hid.h>
17#include <linux/module.h> 17#include <linux/module.h>
18 18
19#include "usbhid/usbhid.h"
20#include "hid-ids.h" 19#include "hid-ids.h"
21 20
22#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) 21#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
@@ -132,7 +131,7 @@ static void steelseries_srws1_set_leds(struct hid_device *hdev, __u16 leds)
132 value[14] = 0x00; 131 value[14] = 0x00;
133 value[15] = 0x00; 132 value[15] = 0x00;
134 133
135 usbhid_submit_report(hdev, report, USB_DIR_OUT); 134 hid_hw_request(hdev, report, HID_REQ_SET_REPORT);
136 135
137 /* Note: LED change does not show on device until the device is read/polled */ 136 /* Note: LED change does not show on device until the device is read/polled */
138} 137}
diff --git a/drivers/hid/hid-tmff.c b/drivers/hid/hid-tmff.c
index e4fcf3f702a5..b83376077d72 100644
--- a/drivers/hid/hid-tmff.c
+++ b/drivers/hid/hid-tmff.c
@@ -30,7 +30,6 @@
30#include <linux/hid.h> 30#include <linux/hid.h>
31#include <linux/input.h> 31#include <linux/input.h>
32#include <linux/slab.h> 32#include <linux/slab.h>
33#include <linux/usb.h>
34#include <linux/module.h> 33#include <linux/module.h>
35 34
36#include "hid-ids.h" 35#include "hid-ids.h"
@@ -46,7 +45,6 @@ static const signed short ff_joystick[] = {
46}; 45};
47 46
48#ifdef CONFIG_THRUSTMASTER_FF 47#ifdef CONFIG_THRUSTMASTER_FF
49#include "usbhid/usbhid.h"
50 48
51/* Usages for thrustmaster devices I know about */ 49/* Usages for thrustmaster devices I know about */
52#define THRUSTMASTER_USAGE_FF (HID_UP_GENDESK | 0xbb) 50#define THRUSTMASTER_USAGE_FF (HID_UP_GENDESK | 0xbb)
@@ -103,7 +101,7 @@ static int tmff_play(struct input_dev *dev, void *data,
103 dbg_hid("(x, y)=(%04x, %04x)\n", x, y); 101 dbg_hid("(x, y)=(%04x, %04x)\n", x, y);
104 ff_field->value[0] = x; 102 ff_field->value[0] = x;
105 ff_field->value[1] = y; 103 ff_field->value[1] = y;
106 usbhid_submit_report(hid, tmff->report, USB_DIR_OUT); 104 hid_hw_request(hid, tmff->report, HID_REQ_SET_REPORT);
107 break; 105 break;
108 106
109 case FF_RUMBLE: 107 case FF_RUMBLE:
@@ -117,7 +115,7 @@ static int tmff_play(struct input_dev *dev, void *data,
117 dbg_hid("(left,right)=(%08x, %08x)\n", left, right); 115 dbg_hid("(left,right)=(%08x, %08x)\n", left, right);
118 ff_field->value[0] = left; 116 ff_field->value[0] = left;
119 ff_field->value[1] = right; 117 ff_field->value[1] = right;
120 usbhid_submit_report(hid, tmff->report, USB_DIR_OUT); 118 hid_hw_request(hid, tmff->report, HID_REQ_SET_REPORT);
121 break; 119 break;
122 } 120 }
123 return 0; 121 return 0;
diff --git a/drivers/hid/hid-zpff.c b/drivers/hid/hid-zpff.c
index af66452592e9..6ec28a37c146 100644
--- a/drivers/hid/hid-zpff.c
+++ b/drivers/hid/hid-zpff.c
@@ -24,13 +24,11 @@
24#include <linux/hid.h> 24#include <linux/hid.h>
25#include <linux/input.h> 25#include <linux/input.h>
26#include <linux/slab.h> 26#include <linux/slab.h>
27#include <linux/usb.h>
28#include <linux/module.h> 27#include <linux/module.h>
29 28
30#include "hid-ids.h" 29#include "hid-ids.h"
31 30
32#ifdef CONFIG_ZEROPLUS_FF 31#ifdef CONFIG_ZEROPLUS_FF
33#include "usbhid/usbhid.h"
34 32
35struct zpff_device { 33struct zpff_device {
36 struct hid_report *report; 34 struct hid_report *report;
@@ -59,7 +57,7 @@ static int zpff_play(struct input_dev *dev, void *data,
59 zpff->report->field[2]->value[0] = left; 57 zpff->report->field[2]->value[0] = left;
60 zpff->report->field[3]->value[0] = right; 58 zpff->report->field[3]->value[0] = right;
61 dbg_hid("running with 0x%02x 0x%02x\n", left, right); 59 dbg_hid("running with 0x%02x 0x%02x\n", left, right);
62 usbhid_submit_report(hid, zpff->report, USB_DIR_OUT); 60 hid_hw_request(hid, zpff->report, HID_REQ_SET_REPORT);
63 61
64 return 0; 62 return 0;
65} 63}
@@ -104,7 +102,7 @@ static int zpff_init(struct hid_device *hid)
104 zpff->report->field[1]->value[0] = 0x02; 102 zpff->report->field[1]->value[0] = 0x02;
105 zpff->report->field[2]->value[0] = 0x00; 103 zpff->report->field[2]->value[0] = 0x00;
106 zpff->report->field[3]->value[0] = 0x00; 104 zpff->report->field[3]->value[0] = 0x00;
107 usbhid_submit_report(hid, zpff->report, USB_DIR_OUT); 105 hid_hw_request(hid, zpff->report, HID_REQ_SET_REPORT);
108 106
109 hid_info(hid, "force feedback for Zeroplus based devices by Anssi Hannula <anssi.hannula@gmail.com>\n"); 107 hid_info(hid, "force feedback for Zeroplus based devices by Anssi Hannula <anssi.hannula@gmail.com>\n");
110 108
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 99d95d3368b5..da68687d2c7c 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -639,7 +639,7 @@ static void __usbhid_submit_report(struct hid_device *hid, struct hid_report *re
639 } 639 }
640} 640}
641 641
642void usbhid_submit_report(struct hid_device *hid, struct hid_report *report, unsigned char dir) 642static void usbhid_submit_report(struct hid_device *hid, struct hid_report *report, unsigned char dir)
643{ 643{
644 struct usbhid_device *usbhid = hid->driver_data; 644 struct usbhid_device *usbhid = hid->driver_data;
645 unsigned long flags; 645 unsigned long flags;
@@ -648,7 +648,6 @@ void usbhid_submit_report(struct hid_device *hid, struct hid_report *report, uns
648 __usbhid_submit_report(hid, report, dir); 648 __usbhid_submit_report(hid, report, dir);
649 spin_unlock_irqrestore(&usbhid->lock, flags); 649 spin_unlock_irqrestore(&usbhid->lock, flags);
650} 650}
651EXPORT_SYMBOL_GPL(usbhid_submit_report);
652 651
653/* Workqueue routine to send requests to change LEDs */ 652/* Workqueue routine to send requests to change LEDs */
654static void hid_led(struct work_struct *work) 653static void hid_led(struct work_struct *work)
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index f91c136821f7..0f1efa39ec46 100644
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -263,8 +263,8 @@ static void pidff_set_envelope_report(struct pidff_device *pidff,
263 envelope->attack_level, 263 envelope->attack_level,
264 pidff->set_envelope[PID_ATTACK_LEVEL].value[0]); 264 pidff->set_envelope[PID_ATTACK_LEVEL].value[0]);
265 265
266 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_ENVELOPE], 266 hid_hw_request(pidff->hid, pidff->reports[PID_SET_ENVELOPE],
267 USB_DIR_OUT); 267 HID_REQ_SET_REPORT);
268} 268}
269 269
270/* 270/*
@@ -290,8 +290,8 @@ static void pidff_set_constant_force_report(struct pidff_device *pidff,
290 pidff_set_signed(&pidff->set_constant[PID_MAGNITUDE], 290 pidff_set_signed(&pidff->set_constant[PID_MAGNITUDE],
291 effect->u.constant.level); 291 effect->u.constant.level);
292 292
293 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_CONSTANT], 293 hid_hw_request(pidff->hid, pidff->reports[PID_SET_CONSTANT],
294 USB_DIR_OUT); 294 HID_REQ_SET_REPORT);
295} 295}
296 296
297/* 297/*
@@ -325,8 +325,8 @@ static void pidff_set_effect_report(struct pidff_device *pidff,
325 pidff->effect_direction); 325 pidff->effect_direction);
326 pidff->set_effect[PID_START_DELAY].value[0] = effect->replay.delay; 326 pidff->set_effect[PID_START_DELAY].value[0] = effect->replay.delay;
327 327
328 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_EFFECT], 328 hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT],
329 USB_DIR_OUT); 329 HID_REQ_SET_REPORT);
330} 330}
331 331
332/* 332/*
@@ -357,8 +357,8 @@ static void pidff_set_periodic_report(struct pidff_device *pidff,
357 pidff_set(&pidff->set_periodic[PID_PHASE], effect->u.periodic.phase); 357 pidff_set(&pidff->set_periodic[PID_PHASE], effect->u.periodic.phase);
358 pidff->set_periodic[PID_PERIOD].value[0] = effect->u.periodic.period; 358 pidff->set_periodic[PID_PERIOD].value[0] = effect->u.periodic.period;
359 359
360 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_PERIODIC], 360 hid_hw_request(pidff->hid, pidff->reports[PID_SET_PERIODIC],
361 USB_DIR_OUT); 361 HID_REQ_SET_REPORT);
362 362
363} 363}
364 364
@@ -399,8 +399,8 @@ static void pidff_set_condition_report(struct pidff_device *pidff,
399 effect->u.condition[i].left_saturation); 399 effect->u.condition[i].left_saturation);
400 pidff_set(&pidff->set_condition[PID_DEAD_BAND], 400 pidff_set(&pidff->set_condition[PID_DEAD_BAND],
401 effect->u.condition[i].deadband); 401 effect->u.condition[i].deadband);
402 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_CONDITION], 402 hid_hw_request(pidff->hid, pidff->reports[PID_SET_CONDITION],
403 USB_DIR_OUT); 403 HID_REQ_SET_REPORT);
404 } 404 }
405} 405}
406 406
@@ -440,8 +440,8 @@ static void pidff_set_ramp_force_report(struct pidff_device *pidff,
440 effect->u.ramp.start_level); 440 effect->u.ramp.start_level);
441 pidff_set_signed(&pidff->set_ramp[PID_RAMP_END], 441 pidff_set_signed(&pidff->set_ramp[PID_RAMP_END],
442 effect->u.ramp.end_level); 442 effect->u.ramp.end_level);
443 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_RAMP], 443 hid_hw_request(pidff->hid, pidff->reports[PID_SET_RAMP],
444 USB_DIR_OUT); 444 HID_REQ_SET_REPORT);
445} 445}
446 446
447/* 447/*
@@ -465,8 +465,8 @@ static int pidff_request_effect_upload(struct pidff_device *pidff, int efnum)
465 int j; 465 int j;
466 466
467 pidff->create_new_effect_type->value[0] = efnum; 467 pidff->create_new_effect_type->value[0] = efnum;
468 usbhid_submit_report(pidff->hid, pidff->reports[PID_CREATE_NEW_EFFECT], 468 hid_hw_request(pidff->hid, pidff->reports[PID_CREATE_NEW_EFFECT],
469 USB_DIR_OUT); 469 HID_REQ_SET_REPORT);
470 hid_dbg(pidff->hid, "create_new_effect sent, type: %d\n", efnum); 470 hid_dbg(pidff->hid, "create_new_effect sent, type: %d\n", efnum);
471 471
472 pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = 0; 472 pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = 0;
@@ -475,8 +475,8 @@ static int pidff_request_effect_upload(struct pidff_device *pidff, int efnum)
475 475
476 for (j = 0; j < 60; j++) { 476 for (j = 0; j < 60; j++) {
477 hid_dbg(pidff->hid, "pid_block_load requested\n"); 477 hid_dbg(pidff->hid, "pid_block_load requested\n");
478 usbhid_submit_report(pidff->hid, pidff->reports[PID_BLOCK_LOAD], 478 hid_hw_request(pidff->hid, pidff->reports[PID_BLOCK_LOAD],
479 USB_DIR_IN); 479 HID_REQ_GET_REPORT);
480 usbhid_wait_io(pidff->hid); 480 usbhid_wait_io(pidff->hid);
481 if (pidff->block_load_status->value[0] == 481 if (pidff->block_load_status->value[0] ==
482 pidff->status_id[PID_BLOCK_LOAD_SUCCESS]) { 482 pidff->status_id[PID_BLOCK_LOAD_SUCCESS]) {
@@ -513,8 +513,8 @@ static void pidff_playback_pid(struct pidff_device *pidff, int pid_id, int n)
513 pidff->effect_operation[PID_LOOP_COUNT].value[0] = n; 513 pidff->effect_operation[PID_LOOP_COUNT].value[0] = n;
514 } 514 }
515 515
516 usbhid_submit_report(pidff->hid, pidff->reports[PID_EFFECT_OPERATION], 516 hid_hw_request(pidff->hid, pidff->reports[PID_EFFECT_OPERATION],
517 USB_DIR_OUT); 517 HID_REQ_SET_REPORT);
518} 518}
519 519
520/** 520/**
@@ -535,8 +535,8 @@ static int pidff_playback(struct input_dev *dev, int effect_id, int value)
535static void pidff_erase_pid(struct pidff_device *pidff, int pid_id) 535static void pidff_erase_pid(struct pidff_device *pidff, int pid_id)
536{ 536{
537 pidff->block_free[PID_EFFECT_BLOCK_INDEX].value[0] = pid_id; 537 pidff->block_free[PID_EFFECT_BLOCK_INDEX].value[0] = pid_id;
538 usbhid_submit_report(pidff->hid, pidff->reports[PID_BLOCK_FREE], 538 hid_hw_request(pidff->hid, pidff->reports[PID_BLOCK_FREE],
539 USB_DIR_OUT); 539 HID_REQ_SET_REPORT);
540} 540}
541 541
542/* 542/*
@@ -718,8 +718,8 @@ static void pidff_set_gain(struct input_dev *dev, u16 gain)
718 struct pidff_device *pidff = dev->ff->private; 718 struct pidff_device *pidff = dev->ff->private;
719 719
720 pidff_set(&pidff->device_gain[PID_DEVICE_GAIN_FIELD], gain); 720 pidff_set(&pidff->device_gain[PID_DEVICE_GAIN_FIELD], gain);
721 usbhid_submit_report(pidff->hid, pidff->reports[PID_DEVICE_GAIN], 721 hid_hw_request(pidff->hid, pidff->reports[PID_DEVICE_GAIN],
722 USB_DIR_OUT); 722 HID_REQ_SET_REPORT);
723} 723}
724 724
725static void pidff_autocenter(struct pidff_device *pidff, u16 magnitude) 725static void pidff_autocenter(struct pidff_device *pidff, u16 magnitude)
@@ -744,8 +744,8 @@ static void pidff_autocenter(struct pidff_device *pidff, u16 magnitude)
744 pidff->set_effect[PID_DIRECTION_ENABLE].value[0] = 1; 744 pidff->set_effect[PID_DIRECTION_ENABLE].value[0] = 1;
745 pidff->set_effect[PID_START_DELAY].value[0] = 0; 745 pidff->set_effect[PID_START_DELAY].value[0] = 0;
746 746
747 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_EFFECT], 747 hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT],
748 USB_DIR_OUT); 748 HID_REQ_SET_REPORT);
749} 749}
750 750
751/* 751/*
@@ -1158,18 +1158,18 @@ static void pidff_reset(struct pidff_device *pidff)
1158 1158
1159 pidff->device_control->value[0] = pidff->control_id[PID_RESET]; 1159 pidff->device_control->value[0] = pidff->control_id[PID_RESET];
1160 /* We reset twice as sometimes hid_wait_io isn't waiting long enough */ 1160 /* We reset twice as sometimes hid_wait_io isn't waiting long enough */
1161 usbhid_submit_report(hid, pidff->reports[PID_DEVICE_CONTROL], USB_DIR_OUT); 1161 hid_hw_request(hid, pidff->reports[PID_DEVICE_CONTROL], HID_REQ_SET_REPORT);
1162 usbhid_wait_io(hid); 1162 usbhid_wait_io(hid);
1163 usbhid_submit_report(hid, pidff->reports[PID_DEVICE_CONTROL], USB_DIR_OUT); 1163 hid_hw_request(hid, pidff->reports[PID_DEVICE_CONTROL], HID_REQ_SET_REPORT);
1164 usbhid_wait_io(hid); 1164 usbhid_wait_io(hid);
1165 1165
1166 pidff->device_control->value[0] = 1166 pidff->device_control->value[0] =
1167 pidff->control_id[PID_ENABLE_ACTUATORS]; 1167 pidff->control_id[PID_ENABLE_ACTUATORS];
1168 usbhid_submit_report(hid, pidff->reports[PID_DEVICE_CONTROL], USB_DIR_OUT); 1168 hid_hw_request(hid, pidff->reports[PID_DEVICE_CONTROL], HID_REQ_SET_REPORT);
1169 usbhid_wait_io(hid); 1169 usbhid_wait_io(hid);
1170 1170
1171 /* pool report is sometimes messed up, refetch it */ 1171 /* pool report is sometimes messed up, refetch it */
1172 usbhid_submit_report(hid, pidff->reports[PID_POOL], USB_DIR_IN); 1172 hid_hw_request(hid, pidff->reports[PID_POOL], HID_REQ_GET_REPORT);
1173 usbhid_wait_io(hid); 1173 usbhid_wait_io(hid);
1174 1174
1175 if (pidff->pool[PID_SIMULTANEOUS_MAX].value) { 1175 if (pidff->pool[PID_SIMULTANEOUS_MAX].value) {
@@ -1181,8 +1181,8 @@ static void pidff_reset(struct pidff_device *pidff)
1181 break; 1181 break;
1182 } 1182 }
1183 hid_dbg(pidff->hid, "pid_pool requested again\n"); 1183 hid_dbg(pidff->hid, "pid_pool requested again\n");
1184 usbhid_submit_report(hid, pidff->reports[PID_POOL], 1184 hid_hw_request(hid, pidff->reports[PID_POOL],
1185 USB_DIR_IN); 1185 HID_REQ_GET_REPORT);
1186 usbhid_wait_io(hid); 1186 usbhid_wait_io(hid);
1187 } 1187 }
1188 } 1188 }
@@ -1269,8 +1269,8 @@ int hid_pidff_init(struct hid_device *hid)
1269 1269
1270 if (test_bit(FF_GAIN, dev->ffbit)) { 1270 if (test_bit(FF_GAIN, dev->ffbit)) {
1271 pidff_set(&pidff->device_gain[PID_DEVICE_GAIN_FIELD], 0xffff); 1271 pidff_set(&pidff->device_gain[PID_DEVICE_GAIN_FIELD], 0xffff);
1272 usbhid_submit_report(hid, pidff->reports[PID_DEVICE_GAIN], 1272 hid_hw_request(hid, pidff->reports[PID_DEVICE_GAIN],
1273 USB_DIR_OUT); 1273 HID_REQ_SET_REPORT);
1274 } 1274 }
1275 1275
1276 error = pidff_check_autocenter(pidff, dev); 1276 error = pidff_check_autocenter(pidff, dev);
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index 87bd64959a91..430d2a9e4521 100644
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -705,7 +705,7 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
705 if (report == NULL) 705 if (report == NULL)
706 break; 706 break;
707 707
708 usbhid_submit_report(hid, report, USB_DIR_IN); 708 hid_hw_request(hid, report, HID_REQ_GET_REPORT);
709 usbhid_wait_io(hid); 709 usbhid_wait_io(hid);
710 710
711 r = 0; 711 r = 0;
@@ -724,7 +724,7 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
724 if (report == NULL) 724 if (report == NULL)
725 break; 725 break;
726 726
727 usbhid_submit_report(hid, report, USB_DIR_OUT); 727 hid_hw_request(hid, report, HID_REQ_SET_REPORT);
728 usbhid_wait_io(hid); 728 usbhid_wait_io(hid);
729 729
730 r = 0; 730 r = 0;
diff --git a/drivers/hid/usbhid/usbhid.h b/drivers/hid/usbhid/usbhid.h
index bd87a61e5303..aa1d5ff1208f 100644
--- a/drivers/hid/usbhid/usbhid.h
+++ b/drivers/hid/usbhid/usbhid.h
@@ -38,8 +38,6 @@ int usbhid_wait_io(struct hid_device* hid);
38void usbhid_close(struct hid_device *hid); 38void usbhid_close(struct hid_device *hid);
39int usbhid_open(struct hid_device *hid); 39int usbhid_open(struct hid_device *hid);
40void usbhid_init_reports(struct hid_device *hid); 40void usbhid_init_reports(struct hid_device *hid);
41void usbhid_submit_report
42(struct hid_device *hid, struct hid_report *report, unsigned char dir);
43int usbhid_get_power(struct hid_device *hid); 41int usbhid_get_power(struct hid_device *hid);
44void usbhid_put_power(struct hid_device *hid); 42void usbhid_put_power(struct hid_device *hid);
45struct usb_interface *usbhid_find_interface(int minor); 43struct usb_interface *usbhid_find_interface(int minor);