aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2013-03-27 09:02:27 -0400
committerJiri Kosina <jkosina@suse.cz>2013-03-27 09:02:27 -0400
commitb3fecf8cab6441527ab057c99d7e6a6d7f6713e5 (patch)
treed327499840a25fbd1f81e49d5cb6769bdad382f5 /drivers/hid
parent5b62efd8250d6a751c31d1972e96bfccd19c4679 (diff)
parent83a44ac8bf4a8e6cbbf0c00ff281a482778f708a (diff)
Merge branch 'for-3.10/hid-driver-transport-cleanups' into for-3.10/mt-hybrid-finger-pen
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/Kconfig98
-rw-r--r--drivers/hid/hid-apple.c1
-rw-r--r--drivers/hid/hid-axff.c6
-rw-r--r--drivers/hid/hid-core.c4
-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-ids.h3
-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.c25
-rw-r--r--drivers/hid/hid-magicmouse.c1
-rw-r--r--drivers/hid/hid-multitouch.c36
-rw-r--r--drivers/hid/hid-ntrig.c10
-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.c12
-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-roccat.c2
-rw-r--r--drivers/hid/hid-sensor-hub.c12
-rw-r--r--drivers/hid/hid-sjoy.c6
-rw-r--r--drivers/hid/hid-speedlink.c2
-rw-r--r--drivers/hid/hid-steelseries.c3
-rw-r--r--drivers/hid/hid-thingm.c1
-rw-r--r--drivers/hid/hid-tmff.c6
-rw-r--r--drivers/hid/hid-zpff.c6
-rw-r--r--drivers/hid/hidraw.c6
-rw-r--r--drivers/hid/i2c-hid/i2c-hid.c32
-rw-r--r--drivers/hid/usbhid/hid-core.c35
-rw-r--r--drivers/hid/usbhid/hid-pidff.c80
-rw-r--r--drivers/hid/usbhid/hiddev.c8
-rw-r--r--drivers/hid/usbhid/usbhid.h3
43 files changed, 260 insertions, 249 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 5f07d85c4189..d1dcfc78bed2 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -92,14 +92,14 @@ menu "Special HID drivers"
92 92
93config HID_A4TECH 93config HID_A4TECH
94 tristate "A4 tech mice" if EXPERT 94 tristate "A4 tech mice" if EXPERT
95 depends on USB_HID 95 depends on HID
96 default !EXPERT 96 default !EXPERT
97 ---help--- 97 ---help---
98 Support for A4 tech X5 and WOP-35 / Trust 450L mice. 98 Support for A4 tech X5 and WOP-35 / Trust 450L mice.
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
@@ -113,7 +113,7 @@ config HID_ACRUX_FF
113 113
114config HID_APPLE 114config HID_APPLE
115 tristate "Apple {i,Power,Mac}Books" if EXPERT 115 tristate "Apple {i,Power,Mac}Books" if EXPERT
116 depends on (USB_HID || BT_HIDP) 116 depends on HID
117 default !EXPERT 117 default !EXPERT
118 ---help--- 118 ---help---
119 Support for some Apple devices which less or more break 119 Support for some Apple devices which less or more break
@@ -124,34 +124,34 @@ config HID_APPLE
124 124
125config HID_AUREAL 125config HID_AUREAL
126 tristate "Aureal" 126 tristate "Aureal"
127 depends on USB_HID 127 depends on HID
128 ---help--- 128 ---help---
129 Support for Aureal Cy se W-01RN Remote Controller and other Aureal derived remotes. 129 Support for Aureal Cy se W-01RN Remote Controller and other Aureal derived remotes.
130 130
131config HID_BELKIN 131config HID_BELKIN
132 tristate "Belkin Flip KVM and Wireless keyboard" if EXPERT 132 tristate "Belkin Flip KVM and Wireless keyboard" if EXPERT
133 depends on USB_HID 133 depends on HID
134 default !EXPERT 134 default !EXPERT
135 ---help--- 135 ---help---
136 Support for Belkin Flip KVM and Wireless keyboard. 136 Support for Belkin Flip KVM and Wireless keyboard.
137 137
138config HID_CHERRY 138config HID_CHERRY
139 tristate "Cherry Cymotion keyboard" if EXPERT 139 tristate "Cherry Cymotion keyboard" if EXPERT
140 depends on USB_HID 140 depends on HID
141 default !EXPERT 141 default !EXPERT
142 ---help--- 142 ---help---
143 Support for Cherry Cymotion keyboard. 143 Support for Cherry Cymotion keyboard.
144 144
145config HID_CHICONY 145config HID_CHICONY
146 tristate "Chicony Tactical pad" if EXPERT 146 tristate "Chicony Tactical pad" if EXPERT
147 depends on USB_HID 147 depends on HID
148 default !EXPERT 148 default !EXPERT
149 ---help--- 149 ---help---
150 Support for Chicony Tactical pad. 150 Support for Chicony Tactical pad.
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.
@@ -166,14 +166,14 @@ config HID_PRODIKEYS
166 166
167config HID_CYPRESS 167config HID_CYPRESS
168 tristate "Cypress mouse and barcode readers" if EXPERT 168 tristate "Cypress mouse and barcode readers" if EXPERT
169 depends on USB_HID 169 depends on HID
170 default !EXPERT 170 default !EXPERT
171 ---help--- 171 ---help---
172 Support for cypress mouse and barcode readers. 172 Support for cypress mouse and barcode readers.
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
@@ -202,13 +202,13 @@ config HID_EMS_FF
202 202
203config HID_ELECOM 203config HID_ELECOM
204 tristate "ELECOM BM084 bluetooth mouse" 204 tristate "ELECOM BM084 bluetooth mouse"
205 depends on BT_HIDP 205 depends on HID
206 ---help--- 206 ---help---
207 Support for the ELECOM BM084 (bluetooth mouse). 207 Support for the ELECOM BM084 (bluetooth mouse).
208 208
209config HID_EZKEY 209config HID_EZKEY
210 tristate "Ezkey BTC 8193 keyboard" if EXPERT 210 tristate "Ezkey BTC 8193 keyboard" if EXPERT
211 depends on USB_HID 211 depends on HID
212 default !EXPERT 212 default !EXPERT
213 ---help--- 213 ---help---
214 Support for Ezkey BTC 8193 keyboard. 214 Support for Ezkey BTC 8193 keyboard.
@@ -231,7 +231,7 @@ config HOLTEK_FF
231 231
232config HID_KEYTOUCH 232config HID_KEYTOUCH
233 tristate "Keytouch HID devices" 233 tristate "Keytouch HID devices"
234 depends on USB_HID 234 depends on HID
235 ---help--- 235 ---help---
236 Support for Keytouch HID devices not fully compliant with 236 Support for Keytouch HID devices not fully compliant with
237 the specification. Currently supported: 237 the specification. Currently supported:
@@ -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
@@ -249,25 +249,25 @@ config HID_KYE
249 249
250config HID_UCLOGIC 250config HID_UCLOGIC
251 tristate "UC-Logic" 251 tristate "UC-Logic"
252 depends on USB_HID 252 depends on HID
253 ---help--- 253 ---help---
254 Support for UC-Logic tablets. 254 Support for UC-Logic tablets.
255 255
256config HID_WALTOP 256config HID_WALTOP
257 tristate "Waltop" 257 tristate "Waltop"
258 depends on USB_HID 258 depends on HID
259 ---help--- 259 ---help---
260 Support for Waltop tablets. 260 Support for Waltop tablets.
261 261
262config HID_GYRATION 262config HID_GYRATION
263 tristate "Gyration remote control" 263 tristate "Gyration remote control"
264 depends on USB_HID 264 depends on HID
265 ---help--- 265 ---help---
266 Support for Gyration remote control. 266 Support for Gyration remote control.
267 267
268config HID_ICADE 268config HID_ICADE
269 tristate "ION iCade arcade controller" 269 tristate "ION iCade arcade controller"
270 depends on BT_HIDP 270 depends on HID
271 ---help--- 271 ---help---
272 Support for the ION iCade arcade controller to work as a joystick. 272 Support for the ION iCade arcade controller to work as a joystick.
273 273
@@ -276,20 +276,20 @@ config HID_ICADE
276 276
277config HID_TWINHAN 277config HID_TWINHAN
278 tristate "Twinhan IR remote control" 278 tristate "Twinhan IR remote control"
279 depends on USB_HID 279 depends on HID
280 ---help--- 280 ---help---
281 Support for Twinhan IR remote control. 281 Support for Twinhan IR remote control.
282 282
283config HID_KENSINGTON 283config HID_KENSINGTON
284 tristate "Kensington Slimblade Trackball" if EXPERT 284 tristate "Kensington Slimblade Trackball" if EXPERT
285 depends on USB_HID 285 depends on HID
286 default !EXPERT 286 default !EXPERT
287 ---help--- 287 ---help---
288 Support for Kensington Slimblade Trackball. 288 Support for Kensington Slimblade Trackball.
289 289
290config HID_LCPOWER 290config HID_LCPOWER
291 tristate "LC-Power" 291 tristate "LC-Power"
292 depends on USB_HID 292 depends on HID
293 ---help--- 293 ---help---
294 Support for LC-Power RC1000MCE RF remote control. 294 Support for LC-Power RC1000MCE RF remote control.
295 295
@@ -308,7 +308,7 @@ config HID_LENOVO_TPKBD
308 308
309config HID_LOGITECH 309config HID_LOGITECH
310 tristate "Logitech devices" if EXPERT 310 tristate "Logitech devices" if EXPERT
311 depends on USB_HID 311 depends on HID
312 default !EXPERT 312 default !EXPERT
313 ---help--- 313 ---help---
314 Support for Logitech devices that are not fully compliant with HID standard. 314 Support for Logitech devices that are not fully compliant with HID standard.
@@ -374,7 +374,7 @@ config LOGIWHEELS_FF
374 374
375config HID_MAGICMOUSE 375config HID_MAGICMOUSE
376 tristate "Apple MagicMouse multi-touch support" 376 tristate "Apple MagicMouse multi-touch support"
377 depends on BT_HIDP 377 depends on HID
378 ---help--- 378 ---help---
379 Support for the Apple Magic Mouse multi-touch. 379 Support for the Apple Magic Mouse multi-touch.
380 380
@@ -383,21 +383,21 @@ config HID_MAGICMOUSE
383 383
384config HID_MICROSOFT 384config HID_MICROSOFT
385 tristate "Microsoft non-fully HID-compliant devices" if EXPERT 385 tristate "Microsoft non-fully HID-compliant devices" if EXPERT
386 depends on USB_HID 386 depends on HID
387 default !EXPERT 387 default !EXPERT
388 ---help--- 388 ---help---
389 Support for Microsoft devices that are not fully compliant with HID standard. 389 Support for Microsoft devices that are not fully compliant with HID standard.
390 390
391config HID_MONTEREY 391config HID_MONTEREY
392 tristate "Monterey Genius KB29E keyboard" if EXPERT 392 tristate "Monterey Genius KB29E keyboard" if EXPERT
393 depends on USB_HID 393 depends on HID
394 default !EXPERT 394 default !EXPERT
395 ---help--- 395 ---help---
396 Support for Monterey Genius KB29E. 396 Support for Monterey Genius KB29E.
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
@@ -445,7 +445,7 @@ config HID_NTRIG
445 445
446config HID_ORTEK 446config HID_ORTEK
447 tristate "Ortek PKB-1700/WKB-2000/Skycable wireless keyboard and mouse trackpad" 447 tristate "Ortek PKB-1700/WKB-2000/Skycable wireless keyboard and mouse trackpad"
448 depends on USB_HID 448 depends on HID
449 ---help--- 449 ---help---
450 There are certain devices which have LogicalMaximum wrong in the keyboard 450 There are certain devices which have LogicalMaximum wrong in the keyboard
451 usage page of their report descriptor. The most prevailing ones so far 451 usage page of their report descriptor. The most prevailing ones so far
@@ -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.
@@ -473,13 +473,13 @@ config PANTHERLORD_FF
473 473
474config HID_PETALYNX 474config HID_PETALYNX
475 tristate "Petalynx Maxter remote control" 475 tristate "Petalynx Maxter remote control"
476 depends on USB_HID 476 depends on HID
477 ---help--- 477 ---help---
478 Support for Petalynx Maxter remote control. 478 Support for Petalynx Maxter remote control.
479 479
480config HID_PICOLCD 480config HID_PICOLCD
481 tristate "PicoLCD (graphic version)" 481 tristate "PicoLCD (graphic version)"
482 depends on USB_HID 482 depends on HID
483 ---help--- 483 ---help---
484 This provides support for Minibox PicoLCD devices, currently 484 This provides support for Minibox PicoLCD devices, currently
485 only the graphical ones are supported. 485 only the graphical ones are supported.
@@ -545,14 +545,14 @@ config HID_PICOLCD_CIR
545 545
546config HID_PRIMAX 546config HID_PRIMAX
547 tristate "Primax non-fully HID-compliant devices" 547 tristate "Primax non-fully HID-compliant devices"
548 depends on USB_HID 548 depends on HID
549 ---help--- 549 ---help---
550 Support for Primax devices that are not fully compliant with the 550 Support for Primax devices that are not fully compliant with the
551 HID standard. 551 HID standard.
552 552
553config HID_PS3REMOTE 553config HID_PS3REMOTE
554 tristate "Sony PS3 BD Remote Control" 554 tristate "Sony PS3 BD Remote Control"
555 depends on BT_HIDP 555 depends on HID
556 ---help--- 556 ---help---
557 Support for the Sony PS3 Blue-ray Disk Remote Control and Logitech 557 Support for the Sony PS3 Blue-ray Disk Remote Control and Logitech
558 Harmony Adapter for PS3, which connect over Bluetooth. 558 Harmony Adapter for PS3, which connect over Bluetooth.
@@ -569,7 +569,7 @@ config HID_ROCCAT
569 569
570config HID_SAITEK 570config HID_SAITEK
571 tristate "Saitek non-fully HID-compliant devices" 571 tristate "Saitek non-fully HID-compliant devices"
572 depends on USB_HID 572 depends on HID
573 ---help--- 573 ---help---
574 Support for Saitek devices that are not fully compliant with the 574 Support for Saitek devices that are not fully compliant with the
575 HID standard. 575 HID standard.
@@ -578,7 +578,7 @@ config HID_SAITEK
578 578
579config HID_SAMSUNG 579config HID_SAMSUNG
580 tristate "Samsung InfraRed remote control or keyboards" 580 tristate "Samsung InfraRed remote control or keyboards"
581 depends on USB_HID 581 depends on HID
582 ---help--- 582 ---help---
583 Support for Samsung InfraRed remote control or keyboards. 583 Support for Samsung InfraRed remote control or keyboards.
584 584
@@ -592,25 +592,25 @@ 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
605config HID_SUNPLUS 605config HID_SUNPLUS
606 tristate "Sunplus wireless desktop" 606 tristate "Sunplus wireless desktop"
607 depends on USB_HID 607 depends on HID
608 ---help--- 608 ---help---
609 Support for Sunplus wireless desktop. 609 Support for Sunplus wireless desktop.
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.
@@ -650,20 +650,20 @@ config SMARTJOYPLUS_FF
650 650
651config HID_TIVO 651config HID_TIVO
652 tristate "TiVo Slide Bluetooth remote control support" 652 tristate "TiVo Slide Bluetooth remote control support"
653 depends on (USB_HID || BT_HIDP) 653 depends on HID
654 ---help--- 654 ---help---
655 Say Y if you have a TiVo Slide Bluetooth remote control. 655 Say Y if you have a TiVo Slide Bluetooth remote control.
656 656
657config HID_TOPSEED 657config HID_TOPSEED
658 tristate "TopSeed Cyberlink, BTC Emprex, Conceptronic remote control support" 658 tristate "TopSeed Cyberlink, BTC Emprex, Conceptronic remote control support"
659 depends on USB_HID 659 depends on HID
660 ---help--- 660 ---help---
661 Say Y if you have a TopSeed Cyberlink or BTC Emprex or Conceptronic 661 Say Y if you have a TopSeed Cyberlink or BTC Emprex or Conceptronic
662 CLLRCMCE remote control. 662 CLLRCMCE remote control.
663 663
664config HID_THINGM 664config HID_THINGM
665 tristate "ThingM blink(1) USB RGB LED" 665 tristate "ThingM blink(1) USB RGB LED"
666 depends on USB_HID 666 depends on HID
667 depends on LEDS_CLASS 667 depends on LEDS_CLASS
668 ---help--- 668 ---help---
669 Support for the ThingM blink(1) USB RGB LED. This driver registers a 669 Support for the ThingM blink(1) USB RGB LED. This driver registers a
@@ -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.
@@ -689,7 +689,7 @@ config THRUSTMASTER_FF
689 689
690config HID_WACOM 690config HID_WACOM
691 tristate "Wacom Bluetooth devices support" 691 tristate "Wacom Bluetooth devices support"
692 depends on BT_HIDP 692 depends on HID
693 depends on LEDS_CLASS 693 depends on LEDS_CLASS
694 select POWER_SUPPLY 694 select POWER_SUPPLY
695 ---help--- 695 ---help---
@@ -697,7 +697,7 @@ config HID_WACOM
697 697
698config HID_WIIMOTE 698config HID_WIIMOTE
699 tristate "Nintendo Wii Remote support" 699 tristate "Nintendo Wii Remote support"
700 depends on BT_HIDP 700 depends on HID
701 depends on LEDS_CLASS 701 depends on LEDS_CLASS
702 select POWER_SUPPLY 702 select POWER_SUPPLY
703 select INPUT_FF_MEMLESS 703 select INPUT_FF_MEMLESS
@@ -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
@@ -729,13 +729,13 @@ config ZEROPLUS_FF
729 729
730config HID_ZYDACRON 730config HID_ZYDACRON
731 tristate "Zydacron remote control support" 731 tristate "Zydacron remote control support"
732 depends on USB_HID 732 depends on HID
733 ---help--- 733 ---help---
734 Support for Zydacron remote control. 734 Support for Zydacron remote control.
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-apple.c b/drivers/hid/hid-apple.c
index 320a958d4139..9e0c4fbbb840 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -21,7 +21,6 @@
21#include <linux/hid.h> 21#include <linux/hid.h>
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/slab.h> 23#include <linux/slab.h>
24#include <linux/usb.h>
25 24
26#include "hid-ids.h" 25#include "hid-ids.h"
27 26
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-core.c b/drivers/hid/hid-core.c
index ff75cabf7393..b76eb9eb6ff1 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -728,8 +728,7 @@ static int hid_scan_report(struct hid_device *hid)
728 } else if (page == HID_UP_SENSOR && 728 } else if (page == HID_UP_SENSOR &&
729 item.type == HID_ITEM_TYPE_MAIN && 729 item.type == HID_ITEM_TYPE_MAIN &&
730 item.tag == HID_MAIN_ITEM_TAG_BEGIN_COLLECTION && 730 item.tag == HID_MAIN_ITEM_TAG_BEGIN_COLLECTION &&
731 (item_udata(&item) & 0xff) == HID_COLLECTION_PHYSICAL && 731 (item_udata(&item) & 0xff) == HID_COLLECTION_PHYSICAL)
732 (hid->bus == BUS_USB || hid->bus == BUS_I2C))
733 hid->group = HID_GROUP_SENSOR_HUB; 732 hid->group = HID_GROUP_SENSOR_HUB;
734 } 733 }
735 734
@@ -2077,6 +2076,7 @@ static const struct hid_device_id hid_ignore_list[] = {
2077 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HYBRID) }, 2076 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HYBRID) },
2078 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HEATCONTROL) }, 2077 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HEATCONTROL) },
2079 { HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_BEATPAD) }, 2078 { HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_BEATPAD) },
2079 { HID_USB_DEVICE(USB_VENDOR_ID_MASTERKIT, USB_DEVICE_ID_MASTERKIT_MA901RADIO) },
2080 { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1024LS) }, 2080 { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1024LS) },
2081 { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1208LS) }, 2081 { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1208LS) },
2082 { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICKIT1) }, 2082 { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICKIT1) },
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-ids.h b/drivers/hid/hid-ids.h
index 6e5c2ffa8d96..92e47e5c9564 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -557,6 +557,9 @@
557#define USB_VENDOR_ID_MADCATZ 0x0738 557#define USB_VENDOR_ID_MADCATZ 0x0738
558#define USB_DEVICE_ID_MADCATZ_BEATPAD 0x4540 558#define USB_DEVICE_ID_MADCATZ_BEATPAD 0x4540
559 559
560#define USB_VENDOR_ID_MASTERKIT 0x16c0
561#define USB_DEVICE_ID_MASTERKIT_MA901RADIO 0x05df
562
560#define USB_VENDOR_ID_MCC 0x09db 563#define USB_VENDOR_ID_MCC 0x09db
561#define USB_DEVICE_ID_MCC_PMD1024LS 0x0076 564#define USB_DEVICE_ID_MCC_PMD1024LS 0x0076
562#define USB_DEVICE_ID_MCC_PMD1208LS 0x007a 565#define USB_DEVICE_ID_MCC_PMD1208LS 0x007a
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..d9043434ddb3 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
@@ -459,19 +458,25 @@ static int logi_dj_recv_send_report(struct dj_receiver_dev *djrcv_dev,
459 struct dj_report *dj_report) 458 struct dj_report *dj_report)
460{ 459{
461 struct hid_device *hdev = djrcv_dev->hdev; 460 struct hid_device *hdev = djrcv_dev->hdev;
462 int sent_bytes; 461 struct hid_report *report;
462 struct hid_report_enum *output_report_enum;
463 u8 *data = (u8 *)(&dj_report->device_index);
464 int i;
463 465
464 if (!hdev->hid_output_raw_report) { 466 output_report_enum = &hdev->report_enum[HID_OUTPUT_REPORT];
465 dev_err(&hdev->dev, "%s:" 467 report = output_report_enum->report_id_hash[REPORT_ID_DJ_SHORT];
466 "hid_output_raw_report is null\n", __func__); 468
469 if (!report) {
470 dev_err(&hdev->dev, "%s: unable to find dj report\n", __func__);
467 return -ENODEV; 471 return -ENODEV;
468 } 472 }
469 473
470 sent_bytes = hdev->hid_output_raw_report(hdev, (u8 *) dj_report, 474 for (i = 0; i < report->field[0]->report_count; i++)
471 sizeof(struct dj_report), 475 report->field[0]->value[i] = data[i];
472 HID_OUTPUT_REPORT); 476
477 hid_hw_request(hdev, report, HID_REQ_SET_REPORT);
473 478
474 return (sent_bytes < 0) ? sent_bytes : 0; 479 return 0;
475} 480}
476 481
477static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev) 482static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev)
@@ -638,7 +643,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); 643 hid_set_field(report->field[0], 1, REPORT_TYPE_LEDS);
639 hid_set_field(report->field[0], 2, data[1]); 644 hid_set_field(report->field[0], 2, data[1]);
640 645
641 usbhid_submit_report(dj_rcv_hiddev, report, USB_DIR_OUT); 646 hid_hw_request(dj_rcv_hiddev, report, HID_REQ_SET_REPORT);
642 647
643 return 0; 648 return 0;
644 649
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index f7f113ba083e..ef89573d65fc 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -19,7 +19,6 @@
19#include <linux/input/mt.h> 19#include <linux/input/mt.h>
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22#include <linux/usb.h>
23 22
24#include "hid-ids.h" 23#include "hid-ids.h"
25 24
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 3f6849ddd29c..1f544a48507d 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -2,8 +2,9 @@
2 * HID driver for multitouch panels 2 * HID driver for multitouch panels
3 * 3 *
4 * Copyright (c) 2010-2012 Stephane Chatty <chatty@enac.fr> 4 * Copyright (c) 2010-2012 Stephane Chatty <chatty@enac.fr>
5 * Copyright (c) 2010-2012 Benjamin Tissoires <benjamin.tissoires@gmail.com> 5 * Copyright (c) 2010-2013 Benjamin Tissoires <benjamin.tissoires@gmail.com>
6 * Copyright (c) 2010-2012 Ecole Nationale de l'Aviation Civile, France 6 * Copyright (c) 2010-2012 Ecole Nationale de l'Aviation Civile, France
7 * Copyright (c) 2012-2013 Red Hat, Inc
7 * 8 *
8 * This code is partly based on hid-egalax.c: 9 * This code is partly based on hid-egalax.c:
9 * 10 *
@@ -26,13 +27,23 @@
26 * any later version. 27 * any later version.
27 */ 28 */
28 29
30/*
31 * This driver is regularly tested thanks to the tool hid-test[1].
32 * This tool relies on hid-replay[2] and a database of hid devices[3].
33 * Please run these regression tests before patching this module so that
34 * your patch won't break existing known devices.
35 *
36 * [1] https://github.com/bentiss/hid-test
37 * [2] https://github.com/bentiss/hid-replay
38 * [3] https://github.com/bentiss/hid-devices
39 */
40
29#include <linux/device.h> 41#include <linux/device.h>
30#include <linux/hid.h> 42#include <linux/hid.h>
31#include <linux/module.h> 43#include <linux/module.h>
32#include <linux/slab.h> 44#include <linux/slab.h>
33#include <linux/usb.h> 45#include <linux/usb.h>
34#include <linux/input/mt.h> 46#include <linux/input/mt.h>
35#include "usbhid/usbhid.h"
36 47
37 48
38MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>"); 49MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>");
@@ -723,7 +734,7 @@ static void mt_set_input_mode(struct hid_device *hdev)
723 r = re->report_id_hash[td->inputmode]; 734 r = re->report_id_hash[td->inputmode];
724 if (r) { 735 if (r) {
725 r->field[0]->value[td->inputmode_index] = 0x02; 736 r->field[0]->value[td->inputmode_index] = 0x02;
726 usbhid_submit_report(hdev, r, USB_DIR_OUT); 737 hid_hw_request(hdev, r, HID_REQ_SET_REPORT);
727 } 738 }
728} 739}
729 740
@@ -748,7 +759,7 @@ static void mt_set_maxcontacts(struct hid_device *hdev)
748 max = min(fieldmax, max); 759 max = min(fieldmax, max);
749 if (r->field[0]->value[0] != max) { 760 if (r->field[0]->value[0] != max) {
750 r->field[0]->value[0] = max; 761 r->field[0]->value[0] = max;
751 usbhid_submit_report(hdev, r, USB_DIR_OUT); 762 hid_hw_request(hdev, r, HID_REQ_SET_REPORT);
752 } 763 }
753 } 764 }
754} 765}
@@ -885,26 +896,11 @@ static int mt_reset_resume(struct hid_device *hdev)
885 896
886static int mt_resume(struct hid_device *hdev) 897static int mt_resume(struct hid_device *hdev)
887{ 898{
888 struct usb_interface *intf;
889 struct usb_host_interface *interface;
890 struct usb_device *dev;
891
892 if (hdev->bus != BUS_USB)
893 return 0;
894
895 intf = to_usb_interface(hdev->dev.parent);
896 interface = intf->cur_altsetting;
897 dev = hid_to_usb_dev(hdev);
898
899 /* Some Elan legacy devices require SET_IDLE to be set on resume. 899 /* Some Elan legacy devices require SET_IDLE to be set on resume.
900 * It should be safe to send it to other devices too. 900 * It should be safe to send it to other devices too.
901 * Tested on 3M, Stantum, Cypress, Zytronic, eGalax, and Elan panels. */ 901 * Tested on 3M, Stantum, Cypress, Zytronic, eGalax, and Elan panels. */
902 902
903 usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 903 hid_hw_idle(hdev, 0, 0, HID_REQ_SET_IDLE);
904 HID_REQ_SET_IDLE,
905 USB_TYPE_CLASS | USB_RECIP_INTERFACE,
906 0, interface->desc.bInterfaceNumber,
907 NULL, 0, USB_CTRL_SET_TIMEOUT);
908 904
909 return 0; 905 return 0;
910} 906}
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index 7757e82416e7..ef95102515e4 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -118,8 +118,8 @@ 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 hid_hw_wait(hdev);
123 return (int)report->field[0]->value[0]; 123 return (int)report->field[0]->value[0];
124} 124}
125 125
@@ -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)
@@ -937,8 +937,8 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
937 if (report) { 937 if (report) {
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 hid_hw_wait(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..591f6b22aa94 100644
--- a/drivers/hid/hid-picolcd_fb.c
+++ b/drivers/hid/hid-picolcd_fb.c
@@ -19,8 +19,6 @@
19 19
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"
23#include <linux/usb.h>
24 22
25#include <linux/fb.h> 23#include <linux/fb.h>
26#include <linux/module.h> 24#include <linux/module.h>
@@ -143,8 +141,8 @@ static int picolcd_fb_send_tile(struct picolcd_data *data, u8 *vbitmap,
143 else 141 else
144 hid_set_field(report2->field[0], 4 + i - 32, tdata[i]); 142 hid_set_field(report2->field[0], 4 + i - 32, tdata[i]);
145 143
146 usbhid_submit_report(data->hdev, report1, USB_DIR_OUT); 144 hid_hw_request(data->hdev, report1, HID_REQ_SET_REPORT);
147 usbhid_submit_report(data->hdev, report2, USB_DIR_OUT); 145 hid_hw_request(data->hdev, report2, HID_REQ_SET_REPORT);
148 spin_unlock_irqrestore(&data->lock, flags); 146 spin_unlock_irqrestore(&data->lock, flags);
149 return 0; 147 return 0;
150} 148}
@@ -214,7 +212,7 @@ int picolcd_fb_reset(struct picolcd_data *data, int clear)
214 hid_set_field(report->field[0], j, mapcmd[j]); 212 hid_set_field(report->field[0], j, mapcmd[j]);
215 else 213 else
216 hid_set_field(report->field[0], j, 0); 214 hid_set_field(report->field[0], j, 0);
217 usbhid_submit_report(data->hdev, report, USB_DIR_OUT); 215 hid_hw_request(data->hdev, report, HID_REQ_SET_REPORT);
218 } 216 }
219 spin_unlock_irqrestore(&data->lock, flags); 217 spin_unlock_irqrestore(&data->lock, flags);
220 218
@@ -270,7 +268,7 @@ static void picolcd_fb_update(struct fb_info *info)
270 mutex_unlock(&info->lock); 268 mutex_unlock(&info->lock);
271 if (!data) 269 if (!data)
272 return; 270 return;
273 usbhid_wait_io(data->hdev); 271 hid_hw_wait(data->hdev);
274 mutex_lock(&info->lock); 272 mutex_lock(&info->lock);
275 n = 0; 273 n = 0;
276 } 274 }
@@ -288,7 +286,7 @@ static void picolcd_fb_update(struct fb_info *info)
288 spin_unlock_irqrestore(&fbdata->lock, flags); 286 spin_unlock_irqrestore(&fbdata->lock, flags);
289 mutex_unlock(&info->lock); 287 mutex_unlock(&info->lock);
290 if (data) 288 if (data)
291 usbhid_wait_io(data->hdev); 289 hid_hw_wait(data->hdev);
292 return; 290 return;
293 } 291 }
294out: 292out:
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-roccat.c b/drivers/hid/hid-roccat.c
index b685b04dbf9d..d7437ef5c695 100644
--- a/drivers/hid/hid-roccat.c
+++ b/drivers/hid/hid-roccat.c
@@ -378,7 +378,7 @@ EXPORT_SYMBOL_GPL(roccat_disconnect);
378 378
379static long roccat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 379static long roccat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
380{ 380{
381 struct inode *inode = file->f_path.dentry->d_inode; 381 struct inode *inode = file_inode(file);
382 struct roccat_device *device; 382 struct roccat_device *device;
383 unsigned int minor = iminor(inode); 383 unsigned int minor = iminor(inode);
384 long retval = 0; 384 long retval = 0;
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index 6679788bf75a..ca7498107327 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -18,8 +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"
23#include <linux/module.h> 21#include <linux/module.h>
24#include <linux/slab.h> 22#include <linux/slab.h>
25#include <linux/mfd/core.h> 23#include <linux/mfd/core.h>
@@ -204,8 +202,8 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
204 goto done_proc; 202 goto done_proc;
205 } 203 }
206 hid_set_field(report->field[field_index], 0, value); 204 hid_set_field(report->field[field_index], 0, value);
207 usbhid_submit_report(hsdev->hdev, report, USB_DIR_OUT); 205 hid_hw_request(hsdev->hdev, report, HID_REQ_SET_REPORT);
208 usbhid_wait_io(hsdev->hdev); 206 hid_hw_wait(hsdev->hdev);
209 207
210done_proc: 208done_proc:
211 mutex_unlock(&data->mutex); 209 mutex_unlock(&data->mutex);
@@ -227,8 +225,8 @@ int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
227 ret = -EINVAL; 225 ret = -EINVAL;
228 goto done_proc; 226 goto done_proc;
229 } 227 }
230 usbhid_submit_report(hsdev->hdev, report, USB_DIR_IN); 228 hid_hw_request(hsdev->hdev, report, HID_REQ_GET_REPORT);
231 usbhid_wait_io(hsdev->hdev); 229 hid_hw_wait(hsdev->hdev);
232 *value = report->field[field_index]->value[0]; 230 *value = report->field[field_index]->value[0];
233 231
234done_proc: 232done_proc:
@@ -262,7 +260,7 @@ int sensor_hub_input_attr_get_raw_value(struct hid_sensor_hub_device *hsdev,
262 spin_unlock_irqrestore(&data->lock, flags); 260 spin_unlock_irqrestore(&data->lock, flags);
263 goto err_free; 261 goto err_free;
264 } 262 }
265 usbhid_submit_report(hsdev->hdev, report, USB_DIR_IN); 263 hid_hw_request(hsdev->hdev, report, HID_REQ_GET_REPORT);
266 spin_unlock_irqrestore(&data->lock, flags); 264 spin_unlock_irqrestore(&data->lock, flags);
267 wait_for_completion_interruptible_timeout(&data->pending.ready, HZ*5); 265 wait_for_completion_interruptible_timeout(&data->pending.ready, HZ*5);
268 switch (data->pending.raw_size) { 266 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-speedlink.c b/drivers/hid/hid-speedlink.c
index e94371a059cb..a2f587d004e1 100644
--- a/drivers/hid/hid-speedlink.c
+++ b/drivers/hid/hid-speedlink.c
@@ -16,10 +16,8 @@
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 19
21#include "hid-ids.h" 20#include "hid-ids.h"
22#include "usbhid/usbhid.h"
23 21
24static const struct hid_device_id speedlink_devices[] = { 22static const struct hid_device_id speedlink_devices[] = {
25 { HID_USB_DEVICE(USB_VENDOR_ID_X_TENSIONS, USB_DEVICE_ID_SPEEDLINK_VAD_CEZANNE)}, 23 { HID_USB_DEVICE(USB_VENDOR_ID_X_TENSIONS, USB_DEVICE_ID_SPEEDLINK_VAD_CEZANNE)},
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-thingm.c b/drivers/hid/hid-thingm.c
index 2055a52e9a20..99342cfa0ea2 100644
--- a/drivers/hid/hid-thingm.c
+++ b/drivers/hid/hid-thingm.c
@@ -12,7 +12,6 @@
12#include <linux/hid.h> 12#include <linux/hid.h>
13#include <linux/leds.h> 13#include <linux/leds.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/usb.h>
16 15
17#include "hid-ids.h" 16#include "hid-ids.h"
18 17
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/hidraw.c b/drivers/hid/hidraw.c
index f3bbbce8353b..a7451632ceb4 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -108,7 +108,7 @@ out:
108 * This function is to be called with the minors_lock mutex held */ 108 * This function is to be called with the minors_lock mutex held */
109static ssize_t hidraw_send_report(struct file *file, const char __user *buffer, size_t count, unsigned char report_type) 109static ssize_t hidraw_send_report(struct file *file, const char __user *buffer, size_t count, unsigned char report_type)
110{ 110{
111 unsigned int minor = iminor(file->f_path.dentry->d_inode); 111 unsigned int minor = iminor(file_inode(file));
112 struct hid_device *dev; 112 struct hid_device *dev;
113 __u8 *buf; 113 __u8 *buf;
114 int ret = 0; 114 int ret = 0;
@@ -176,7 +176,7 @@ static ssize_t hidraw_write(struct file *file, const char __user *buffer, size_t
176 * mutex held. */ 176 * mutex held. */
177static ssize_t hidraw_get_report(struct file *file, char __user *buffer, size_t count, unsigned char report_type) 177static ssize_t hidraw_get_report(struct file *file, char __user *buffer, size_t count, unsigned char report_type)
178{ 178{
179 unsigned int minor = iminor(file->f_path.dentry->d_inode); 179 unsigned int minor = iminor(file_inode(file));
180 struct hid_device *dev; 180 struct hid_device *dev;
181 __u8 *buf; 181 __u8 *buf;
182 int ret = 0, len; 182 int ret = 0, len;
@@ -340,7 +340,7 @@ unlock:
340static long hidraw_ioctl(struct file *file, unsigned int cmd, 340static long hidraw_ioctl(struct file *file, unsigned int cmd,
341 unsigned long arg) 341 unsigned long arg)
342{ 342{
343 struct inode *inode = file->f_path.dentry->d_inode; 343 struct inode *inode = file_inode(file);
344 unsigned int minor = iminor(inode); 344 unsigned int minor = iminor(inode);
345 long ret = 0; 345 long ret = 0;
346 struct hidraw *dev; 346 struct hidraw *dev;
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index ec7930217a6d..935f387be95a 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -563,6 +563,37 @@ static int i2c_hid_output_raw_report(struct hid_device *hid, __u8 *buf,
563 return ret; 563 return ret;
564} 564}
565 565
566static void i2c_hid_request(struct hid_device *hid, struct hid_report *rep,
567 int reqtype)
568{
569 struct i2c_client *client = hid->driver_data;
570 struct i2c_hid *ihid = i2c_get_clientdata(client);
571 char *buf;
572 int ret;
573
574 buf = kzalloc(ihid->bufsize, GFP_KERNEL);
575 if (!buf)
576 return;
577
578 switch (reqtype) {
579 case HID_REQ_GET_REPORT:
580 ret = i2c_hid_get_raw_report(hid, rep->id, buf, ihid->bufsize,
581 rep->type);
582 if (ret < 0)
583 dev_err(&client->dev, "%s: unable to get report: %d\n",
584 __func__, ret);
585 else
586 hid_input_report(hid, rep->type, buf, ret, 0);
587 break;
588 case HID_REQ_SET_REPORT:
589 hid_output_report(rep, buf);
590 i2c_hid_output_raw_report(hid, buf, ihid->bufsize, rep->type);
591 break;
592 }
593
594 kfree(buf);
595}
596
566static int i2c_hid_parse(struct hid_device *hid) 597static int i2c_hid_parse(struct hid_device *hid)
567{ 598{
568 struct i2c_client *client = hid->driver_data; 599 struct i2c_client *client = hid->driver_data;
@@ -742,6 +773,7 @@ static struct hid_ll_driver i2c_hid_ll_driver = {
742 .open = i2c_hid_open, 773 .open = i2c_hid_open,
743 .close = i2c_hid_close, 774 .close = i2c_hid_close,
744 .power = i2c_hid_power, 775 .power = i2c_hid_power,
776 .request = i2c_hid_request,
745 .hidinput_input_event = i2c_hid_hidinput_input_event, 777 .hidinput_input_event = i2c_hid_hidinput_input_event,
746}; 778};
747 779
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 8e0c4bf94ebc..effcd3d6f5cf 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)
@@ -706,7 +705,7 @@ static int usb_hidinput_input_event(struct input_dev *dev, unsigned int type, un
706 return 0; 705 return 0;
707} 706}
708 707
709int usbhid_wait_io(struct hid_device *hid) 708static int usbhid_wait_io(struct hid_device *hid)
710{ 709{
711 struct usbhid_device *usbhid = hid->driver_data; 710 struct usbhid_device *usbhid = hid->driver_data;
712 711
@@ -720,7 +719,6 @@ int usbhid_wait_io(struct hid_device *hid)
720 719
721 return 0; 720 return 0;
722} 721}
723EXPORT_SYMBOL_GPL(usbhid_wait_io);
724 722
725static int hid_set_idle(struct usb_device *dev, int ifnum, int report, int idle) 723static int hid_set_idle(struct usb_device *dev, int ifnum, int report, int idle)
726{ 724{
@@ -1243,6 +1241,32 @@ static int usbhid_power(struct hid_device *hid, int lvl)
1243 return r; 1241 return r;
1244} 1242}
1245 1243
1244static void usbhid_request(struct hid_device *hid, struct hid_report *rep, int reqtype)
1245{
1246 switch (reqtype) {
1247 case HID_REQ_GET_REPORT:
1248 usbhid_submit_report(hid, rep, USB_DIR_IN);
1249 break;
1250 case HID_REQ_SET_REPORT:
1251 usbhid_submit_report(hid, rep, USB_DIR_OUT);
1252 break;
1253 }
1254}
1255
1256static int usbhid_idle(struct hid_device *hid, int report, int idle,
1257 int reqtype)
1258{
1259 struct usb_device *dev = hid_to_usb_dev(hid);
1260 struct usb_interface *intf = to_usb_interface(hid->dev.parent);
1261 struct usb_host_interface *interface = intf->cur_altsetting;
1262 int ifnum = interface->desc.bInterfaceNumber;
1263
1264 if (reqtype != HID_REQ_SET_IDLE)
1265 return -EINVAL;
1266
1267 return hid_set_idle(dev, ifnum, report, idle);
1268}
1269
1246static struct hid_ll_driver usb_hid_driver = { 1270static struct hid_ll_driver usb_hid_driver = {
1247 .parse = usbhid_parse, 1271 .parse = usbhid_parse,
1248 .start = usbhid_start, 1272 .start = usbhid_start,
@@ -1251,6 +1275,9 @@ static struct hid_ll_driver usb_hid_driver = {
1251 .close = usbhid_close, 1275 .close = usbhid_close,
1252 .power = usbhid_power, 1276 .power = usbhid_power,
1253 .hidinput_input_event = usb_hidinput_input_event, 1277 .hidinput_input_event = usb_hidinput_input_event,
1278 .request = usbhid_request,
1279 .wait = usbhid_wait_io,
1280 .idle = usbhid_idle,
1254}; 1281};
1255 1282
1256static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *id) 1283static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *id)
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index f91c136821f7..10b616702780 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,19 +465,19 @@ 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;
473 pidff->block_load_status->value[0] = 0; 473 pidff->block_load_status->value[0] = 0;
474 usbhid_wait_io(pidff->hid); 474 hid_hw_wait(pidff->hid);
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 hid_hw_wait(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]) {
483 hid_dbg(pidff->hid, "device reported free memory: %d bytes\n", 483 hid_dbg(pidff->hid, "device reported free memory: %d bytes\n",
@@ -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/*
@@ -551,7 +551,7 @@ static int pidff_erase_effect(struct input_dev *dev, int effect_id)
551 effect_id, pidff->pid_id[effect_id]); 551 effect_id, pidff->pid_id[effect_id]);
552 /* Wait for the queue to clear. We do not want a full fifo to 552 /* Wait for the queue to clear. We do not want a full fifo to
553 prevent the effect removal. */ 553 prevent the effect removal. */
554 usbhid_wait_io(pidff->hid); 554 hid_hw_wait(pidff->hid);
555 pidff_playback_pid(pidff, pid_id, 0); 555 pidff_playback_pid(pidff, pid_id, 0);
556 pidff_erase_pid(pidff, pid_id); 556 pidff_erase_pid(pidff, pid_id);
557 557
@@ -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,19 +1158,19 @@ 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 hid_hw_wait(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 hid_hw_wait(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 hid_hw_wait(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 hid_hw_wait(hid);
1174 1174
1175 if (pidff->pool[PID_SIMULTANEOUS_MAX].value) { 1175 if (pidff->pool[PID_SIMULTANEOUS_MAX].value) {
1176 while (pidff->pool[PID_SIMULTANEOUS_MAX].value[0] < 2) { 1176 while (pidff->pool[PID_SIMULTANEOUS_MAX].value[0] < 2) {
@@ -1181,9 +1181,9 @@ 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 hid_hw_wait(hid);
1187 } 1187 }
1188 } 1188 }
1189} 1189}
@@ -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..2f1ddca6f2e0 100644
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -705,8 +705,8 @@ 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 hid_hw_wait(hid);
710 710
711 r = 0; 711 r = 0;
712 break; 712 break;
@@ -724,8 +724,8 @@ 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 hid_hw_wait(hid);
729 729
730 r = 0; 730 r = 0;
731 break; 731 break;
diff --git a/drivers/hid/usbhid/usbhid.h b/drivers/hid/usbhid/usbhid.h
index bd87a61e5303..dbb6af699135 100644
--- a/drivers/hid/usbhid/usbhid.h
+++ b/drivers/hid/usbhid/usbhid.h
@@ -34,12 +34,9 @@
34#include <linux/input.h> 34#include <linux/input.h>
35 35
36/* API provided by hid-core.c for USB HID drivers */ 36/* API provided by hid-core.c for USB HID drivers */
37int usbhid_wait_io(struct hid_device* hid);
38void usbhid_close(struct hid_device *hid); 37void usbhid_close(struct hid_device *hid);
39int usbhid_open(struct hid_device *hid); 38int usbhid_open(struct hid_device *hid);
40void usbhid_init_reports(struct hid_device *hid); 39void 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); 40int usbhid_get_power(struct hid_device *hid);
44void usbhid_put_power(struct hid_device *hid); 41void usbhid_put_power(struct hid_device *hid);
45struct usb_interface *usbhid_find_interface(int minor); 42struct usb_interface *usbhid_find_interface(int minor);