aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-10-05 09:55:46 -0400
committerDavid Howells <dhowells@warthog.cambridge.redhat.com>2006-10-05 10:10:12 -0400
commit7d12e780e003f93433d49ce78cfedf4b4c52adc5 (patch)
tree6748550400445c11a306b132009f3001e3525df8 /drivers/usb/input
parentda482792a6d1a3fbaaa25fae867b343fb4db3246 (diff)
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
Diffstat (limited to 'drivers/usb/input')
-rw-r--r--drivers/usb/input/acecad.c2
-rw-r--r--drivers/usb/input/aiptek.c13
-rw-r--r--drivers/usb/input/appletouch.c2
-rw-r--r--drivers/usb/input/ati_remote.c17
-rw-r--r--drivers/usb/input/ati_remote2.c14
-rw-r--r--drivers/usb/input/hid-core.c28
-rw-r--r--drivers/usb/input/hid-input.c4
-rw-r--r--drivers/usb/input/hid.h4
-rw-r--r--drivers/usb/input/hiddev.c2
-rw-r--r--drivers/usb/input/itmtouch.c4
-rw-r--r--drivers/usb/input/kbtab.c2
-rw-r--r--drivers/usb/input/keyspan_remote.c7
-rw-r--r--drivers/usb/input/mtouchusb.c3
-rw-r--r--drivers/usb/input/powermate.c7
-rw-r--r--drivers/usb/input/touchkitusb.c15
-rw-r--r--drivers/usb/input/usbkbd.c6
-rw-r--r--drivers/usb/input/usbmouse.c4
-rw-r--r--drivers/usb/input/usbtouchscreen.c15
-rw-r--r--drivers/usb/input/wacom.h4
-rw-r--r--drivers/usb/input/wacom_sys.c9
-rw-r--r--drivers/usb/input/wacom_wac.c9
-rw-r--r--drivers/usb/input/xpad.c8
-rw-r--r--drivers/usb/input/yealink.c9
23 files changed, 67 insertions, 121 deletions
diff --git a/drivers/usb/input/acecad.c b/drivers/usb/input/acecad.c
index d83603ba40ae..0096373b5f98 100644
--- a/drivers/usb/input/acecad.c
+++ b/drivers/usb/input/acecad.c
@@ -58,7 +58,7 @@ struct usb_acecad {
58 dma_addr_t data_dma; 58 dma_addr_t data_dma;
59}; 59};
60 60
61static void usb_acecad_irq(struct urb *urb, struct pt_regs *regs) 61static void usb_acecad_irq(struct urb *urb)
62{ 62{
63 struct usb_acecad *acecad = urb->context; 63 struct usb_acecad *acecad = urb->context;
64 unsigned char *data = acecad->data; 64 unsigned char *data = acecad->data;
diff --git a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c
index b138dae2b055..bf428184608f 100644
--- a/drivers/usb/input/aiptek.c
+++ b/drivers/usb/input/aiptek.c
@@ -396,7 +396,7 @@ static int aiptek_convert_from_2s_complement(unsigned char c)
396 * replaced with the input_sync() method (which emits EV_SYN.) 396 * replaced with the input_sync() method (which emits EV_SYN.)
397 */ 397 */
398 398
399static void aiptek_irq(struct urb *urb, struct pt_regs *regs) 399static void aiptek_irq(struct urb *urb)
400{ 400{
401 struct aiptek *aiptek = urb->context; 401 struct aiptek *aiptek = urb->context;
402 unsigned char *data = aiptek->data; 402 unsigned char *data = aiptek->data;
@@ -442,8 +442,6 @@ static void aiptek_irq(struct urb *urb, struct pt_regs *regs)
442 aiptek->diagnostic = 442 aiptek->diagnostic =
443 AIPTEK_DIAGNOSTIC_SENDING_RELATIVE_IN_ABSOLUTE; 443 AIPTEK_DIAGNOSTIC_SENDING_RELATIVE_IN_ABSOLUTE;
444 } else { 444 } else {
445 input_regs(inputdev, regs);
446
447 x = aiptek_convert_from_2s_complement(data[2]); 445 x = aiptek_convert_from_2s_complement(data[2]);
448 y = aiptek_convert_from_2s_complement(data[3]); 446 y = aiptek_convert_from_2s_complement(data[3]);
449 447
@@ -488,8 +486,6 @@ static void aiptek_irq(struct urb *urb, struct pt_regs *regs)
488 (aiptek->curSetting.pointerMode)) { 486 (aiptek->curSetting.pointerMode)) {
489 aiptek->diagnostic = AIPTEK_DIAGNOSTIC_TOOL_DISALLOWED; 487 aiptek->diagnostic = AIPTEK_DIAGNOSTIC_TOOL_DISALLOWED;
490 } else { 488 } else {
491 input_regs(inputdev, regs);
492
493 x = le16_to_cpu(get_unaligned((__le16 *) (data + 1))); 489 x = le16_to_cpu(get_unaligned((__le16 *) (data + 1)));
494 y = le16_to_cpu(get_unaligned((__le16 *) (data + 3))); 490 y = le16_to_cpu(get_unaligned((__le16 *) (data + 3)));
495 z = le16_to_cpu(get_unaligned((__le16 *) (data + 6))); 491 z = le16_to_cpu(get_unaligned((__le16 *) (data + 6)));
@@ -568,7 +564,6 @@ static void aiptek_irq(struct urb *urb, struct pt_regs *regs)
568 (aiptek->curSetting.pointerMode)) { 564 (aiptek->curSetting.pointerMode)) {
569 aiptek->diagnostic = AIPTEK_DIAGNOSTIC_TOOL_DISALLOWED; 565 aiptek->diagnostic = AIPTEK_DIAGNOSTIC_TOOL_DISALLOWED;
570 } else { 566 } else {
571 input_regs(inputdev, regs);
572 x = le16_to_cpu(get_unaligned((__le16 *) (data + 1))); 567 x = le16_to_cpu(get_unaligned((__le16 *) (data + 1)));
573 y = le16_to_cpu(get_unaligned((__le16 *) (data + 3))); 568 y = le16_to_cpu(get_unaligned((__le16 *) (data + 3)));
574 569
@@ -631,8 +626,6 @@ static void aiptek_irq(struct urb *urb, struct pt_regs *regs)
631 z = le16_to_cpu(get_unaligned((__le16 *) (data + 4))); 626 z = le16_to_cpu(get_unaligned((__le16 *) (data + 4)));
632 627
633 if (dv != 0) { 628 if (dv != 0) {
634 input_regs(inputdev, regs);
635
636 /* If we've not already sent a tool_button_?? code, do 629 /* If we've not already sent a tool_button_?? code, do
637 * so now. Then set FIRED_BIT so it won't be resent unless 630 * so now. Then set FIRED_BIT so it won't be resent unless
638 * the user forces FIRED_BIT off. 631 * the user forces FIRED_BIT off.
@@ -681,8 +674,6 @@ static void aiptek_irq(struct urb *urb, struct pt_regs *regs)
681 macro = data[3]; 674 macro = data[3];
682 675
683 if (dv != 0) { 676 if (dv != 0) {
684 input_regs(inputdev, regs);
685
686 /* If we've not already sent a tool_button_?? code, do 677 /* If we've not already sent a tool_button_?? code, do
687 * so now. Then set FIRED_BIT so it won't be resent unless 678 * so now. Then set FIRED_BIT so it won't be resent unless
688 * the user forces FIRED_BIT off. 679 * the user forces FIRED_BIT off.
@@ -726,8 +717,6 @@ static void aiptek_irq(struct urb *urb, struct pt_regs *regs)
726 */ 717 */
727 else if (data[0] == 6) { 718 else if (data[0] == 6) {
728 macro = le16_to_cpu(get_unaligned((__le16 *) (data + 1))); 719 macro = le16_to_cpu(get_unaligned((__le16 *) (data + 1)));
729 input_regs(inputdev, regs);
730
731 if (macro > 0) { 720 if (macro > 0) {
732 input_report_key(inputdev, macroKeyEvents[macro - 1], 721 input_report_key(inputdev, macroKeyEvents[macro - 1],
733 0); 722 0);
diff --git a/drivers/usb/input/appletouch.c b/drivers/usb/input/appletouch.c
index 0aa9cc2bfd69..4c213513484d 100644
--- a/drivers/usb/input/appletouch.c
+++ b/drivers/usb/input/appletouch.c
@@ -210,7 +210,7 @@ static inline void atp_report_fingers(struct input_dev *input, int fingers)
210 input_report_key(input, BTN_TOOL_TRIPLETAP, fingers > 2); 210 input_report_key(input, BTN_TOOL_TRIPLETAP, fingers > 2);
211} 211}
212 212
213static void atp_complete(struct urb* urb, struct pt_regs* regs) 213static void atp_complete(struct urb* urb)
214{ 214{
215 int x, y, x_z, y_z, x_f, y_f; 215 int x, y, x_z, y_z, x_f, y_f;
216 int retval, i, j; 216 int retval, i, j;
diff --git a/drivers/usb/input/ati_remote.c b/drivers/usb/input/ati_remote.c
index 3558d7ed99b9..f659f3028ad2 100644
--- a/drivers/usb/input/ati_remote.c
+++ b/drivers/usb/input/ati_remote.c
@@ -283,9 +283,9 @@ static void ati_remote_dump (unsigned char *data, unsigned int actual_length);
283static int ati_remote_open (struct input_dev *inputdev); 283static int ati_remote_open (struct input_dev *inputdev);
284static void ati_remote_close (struct input_dev *inputdev); 284static void ati_remote_close (struct input_dev *inputdev);
285static int ati_remote_sendpacket (struct ati_remote *ati_remote, u16 cmd, unsigned char *data); 285static int ati_remote_sendpacket (struct ati_remote *ati_remote, u16 cmd, unsigned char *data);
286static void ati_remote_irq_out (struct urb *urb, struct pt_regs *regs); 286static void ati_remote_irq_out (struct urb *urb);
287static void ati_remote_irq_in (struct urb *urb, struct pt_regs *regs); 287static void ati_remote_irq_in (struct urb *urb);
288static void ati_remote_input_report (struct urb *urb, struct pt_regs *regs); 288static void ati_remote_input_report (struct urb *urb);
289static int ati_remote_initialize (struct ati_remote *ati_remote); 289static int ati_remote_initialize (struct ati_remote *ati_remote);
290static int ati_remote_probe (struct usb_interface *interface, const struct usb_device_id *id); 290static int ati_remote_probe (struct usb_interface *interface, const struct usb_device_id *id);
291static void ati_remote_disconnect (struct usb_interface *interface); 291static void ati_remote_disconnect (struct usb_interface *interface);
@@ -344,7 +344,7 @@ static void ati_remote_close(struct input_dev *inputdev)
344/* 344/*
345 * ati_remote_irq_out 345 * ati_remote_irq_out
346 */ 346 */
347static void ati_remote_irq_out(struct urb *urb, struct pt_regs *regs) 347static void ati_remote_irq_out(struct urb *urb)
348{ 348{
349 struct ati_remote *ati_remote = urb->context; 349 struct ati_remote *ati_remote = urb->context;
350 350
@@ -453,7 +453,7 @@ static int ati_remote_compute_accel(struct ati_remote *ati_remote)
453/* 453/*
454 * ati_remote_report_input 454 * ati_remote_report_input
455 */ 455 */
456static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs) 456static void ati_remote_input_report(struct urb *urb)
457{ 457{
458 struct ati_remote *ati_remote = urb->context; 458 struct ati_remote *ati_remote = urb->context;
459 unsigned char *data= ati_remote->inbuf; 459 unsigned char *data= ati_remote->inbuf;
@@ -491,7 +491,6 @@ static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs)
491 remote_num, data[1], data[2], index, ati_remote_tbl[index].code); 491 remote_num, data[1], data[2], index, ati_remote_tbl[index].code);
492 492
493 if (ati_remote_tbl[index].kind == KIND_LITERAL) { 493 if (ati_remote_tbl[index].kind == KIND_LITERAL) {
494 input_regs(dev, regs);
495 input_event(dev, ati_remote_tbl[index].type, 494 input_event(dev, ati_remote_tbl[index].type,
496 ati_remote_tbl[index].code, 495 ati_remote_tbl[index].code,
497 ati_remote_tbl[index].value); 496 ati_remote_tbl[index].value);
@@ -520,7 +519,6 @@ static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs)
520 return; 519 return;
521 520
522 521
523 input_regs(dev, regs);
524 input_event(dev, ati_remote_tbl[index].type, 522 input_event(dev, ati_remote_tbl[index].type,
525 ati_remote_tbl[index].code, 1); 523 ati_remote_tbl[index].code, 1);
526 input_sync(dev); 524 input_sync(dev);
@@ -537,7 +535,6 @@ static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs)
537 */ 535 */
538 acc = ati_remote_compute_accel(ati_remote); 536 acc = ati_remote_compute_accel(ati_remote);
539 537
540 input_regs(dev, regs);
541 switch (ati_remote_tbl[index].kind) { 538 switch (ati_remote_tbl[index].kind) {
542 case KIND_ACCEL: 539 case KIND_ACCEL:
543 input_event(dev, ati_remote_tbl[index].type, 540 input_event(dev, ati_remote_tbl[index].type,
@@ -575,14 +572,14 @@ static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs)
575/* 572/*
576 * ati_remote_irq_in 573 * ati_remote_irq_in
577 */ 574 */
578static void ati_remote_irq_in(struct urb *urb, struct pt_regs *regs) 575static void ati_remote_irq_in(struct urb *urb)
579{ 576{
580 struct ati_remote *ati_remote = urb->context; 577 struct ati_remote *ati_remote = urb->context;
581 int retval; 578 int retval;
582 579
583 switch (urb->status) { 580 switch (urb->status) {
584 case 0: /* success */ 581 case 0: /* success */
585 ati_remote_input_report(urb, regs); 582 ati_remote_input_report(urb);
586 break; 583 break;
587 case -ECONNRESET: /* unlink */ 584 case -ECONNRESET: /* unlink */
588 case -ENOENT: 585 case -ENOENT:
diff --git a/drivers/usb/input/ati_remote2.c b/drivers/usb/input/ati_remote2.c
index ea71de81ca6b..f982a2b4a7f9 100644
--- a/drivers/usb/input/ati_remote2.c
+++ b/drivers/usb/input/ati_remote2.c
@@ -142,7 +142,7 @@ static void ati_remote2_close(struct input_dev *idev)
142 usb_kill_urb(ar2->urb[1]); 142 usb_kill_urb(ar2->urb[1]);
143} 143}
144 144
145static void ati_remote2_input_mouse(struct ati_remote2 *ar2, struct pt_regs *regs) 145static void ati_remote2_input_mouse(struct ati_remote2 *ar2)
146{ 146{
147 struct input_dev *idev = ar2->idev; 147 struct input_dev *idev = ar2->idev;
148 u8 *data = ar2->buf[0]; 148 u8 *data = ar2->buf[0];
@@ -157,7 +157,6 @@ static void ati_remote2_input_mouse(struct ati_remote2 *ar2, struct pt_regs *reg
157 if (!((1 << data[0]) & mode_mask)) 157 if (!((1 << data[0]) & mode_mask))
158 return; 158 return;
159 159
160 input_regs(idev, regs);
161 input_event(idev, EV_REL, REL_X, (s8) data[1]); 160 input_event(idev, EV_REL, REL_X, (s8) data[1]);
162 input_event(idev, EV_REL, REL_Y, (s8) data[2]); 161 input_event(idev, EV_REL, REL_Y, (s8) data[2]);
163 input_sync(idev); 162 input_sync(idev);
@@ -174,7 +173,7 @@ static int ati_remote2_lookup(unsigned int hw_code)
174 return -1; 173 return -1;
175} 174}
176 175
177static void ati_remote2_input_key(struct ati_remote2 *ar2, struct pt_regs *regs) 176static void ati_remote2_input_key(struct ati_remote2 *ar2)
178{ 177{
179 struct input_dev *idev = ar2->idev; 178 struct input_dev *idev = ar2->idev;
180 u8 *data = ar2->buf[1]; 179 u8 *data = ar2->buf[1];
@@ -245,19 +244,18 @@ static void ati_remote2_input_key(struct ati_remote2 *ar2, struct pt_regs *regs)
245 return; 244 return;
246 } 245 }
247 246
248 input_regs(idev, regs);
249 input_event(idev, EV_KEY, ati_remote2_key_table[index].key_code, data[1]); 247 input_event(idev, EV_KEY, ati_remote2_key_table[index].key_code, data[1]);
250 input_sync(idev); 248 input_sync(idev);
251} 249}
252 250
253static void ati_remote2_complete_mouse(struct urb *urb, struct pt_regs *regs) 251static void ati_remote2_complete_mouse(struct urb *urb)
254{ 252{
255 struct ati_remote2 *ar2 = urb->context; 253 struct ati_remote2 *ar2 = urb->context;
256 int r; 254 int r;
257 255
258 switch (urb->status) { 256 switch (urb->status) {
259 case 0: 257 case 0:
260 ati_remote2_input_mouse(ar2, regs); 258 ati_remote2_input_mouse(ar2);
261 break; 259 break;
262 case -ENOENT: 260 case -ENOENT:
263 case -EILSEQ: 261 case -EILSEQ:
@@ -277,14 +275,14 @@ static void ati_remote2_complete_mouse(struct urb *urb, struct pt_regs *regs)
277 "%s(): usb_submit_urb() = %d\n", __FUNCTION__, r); 275 "%s(): usb_submit_urb() = %d\n", __FUNCTION__, r);
278} 276}
279 277
280static void ati_remote2_complete_key(struct urb *urb, struct pt_regs *regs) 278static void ati_remote2_complete_key(struct urb *urb)
281{ 279{
282 struct ati_remote2 *ar2 = urb->context; 280 struct ati_remote2 *ar2 = urb->context;
283 int r; 281 int r;
284 282
285 switch (urb->status) { 283 switch (urb->status) {
286 case 0: 284 case 0:
287 ati_remote2_input_key(ar2, regs); 285 ati_remote2_input_key(ar2);
288 break; 286 break;
289 case -ENOENT: 287 case -ENOENT:
290 case -EILSEQ: 288 case -EILSEQ:
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
index e0fd11605b43..a6738a83ff5b 100644
--- a/drivers/usb/input/hid-core.c
+++ b/drivers/usb/input/hid-core.c
@@ -780,13 +780,13 @@ static __inline__ int search(__s32 *array, __s32 value, unsigned n)
780 return -1; 780 return -1;
781} 781}
782 782
783static void hid_process_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value, int interrupt, struct pt_regs *regs) 783static void hid_process_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value, int interrupt)
784{ 784{
785 hid_dump_input(usage, value); 785 hid_dump_input(usage, value);
786 if (hid->claimed & HID_CLAIMED_INPUT) 786 if (hid->claimed & HID_CLAIMED_INPUT)
787 hidinput_hid_event(hid, field, usage, value, regs); 787 hidinput_hid_event(hid, field, usage, value);
788 if (hid->claimed & HID_CLAIMED_HIDDEV && interrupt) 788 if (hid->claimed & HID_CLAIMED_HIDDEV && interrupt)
789 hiddev_hid_event(hid, field, usage, value, regs); 789 hiddev_hid_event(hid, field, usage, value);
790} 790}
791 791
792/* 792/*
@@ -795,7 +795,7 @@ static void hid_process_event(struct hid_device *hid, struct hid_field *field, s
795 * reporting to the layer). 795 * reporting to the layer).
796 */ 796 */
797 797
798static void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt, struct pt_regs *regs) 798static void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt)
799{ 799{
800 unsigned n; 800 unsigned n;
801 unsigned count = field->report_count; 801 unsigned count = field->report_count;
@@ -822,19 +822,19 @@ static void hid_input_field(struct hid_device *hid, struct hid_field *field, __u
822 for (n = 0; n < count; n++) { 822 for (n = 0; n < count; n++) {
823 823
824 if (HID_MAIN_ITEM_VARIABLE & field->flags) { 824 if (HID_MAIN_ITEM_VARIABLE & field->flags) {
825 hid_process_event(hid, field, &field->usage[n], value[n], interrupt, regs); 825 hid_process_event(hid, field, &field->usage[n], value[n], interrupt);
826 continue; 826 continue;
827 } 827 }
828 828
829 if (field->value[n] >= min && field->value[n] <= max 829 if (field->value[n] >= min && field->value[n] <= max
830 && field->usage[field->value[n] - min].hid 830 && field->usage[field->value[n] - min].hid
831 && search(value, field->value[n], count)) 831 && search(value, field->value[n], count))
832 hid_process_event(hid, field, &field->usage[field->value[n] - min], 0, interrupt, regs); 832 hid_process_event(hid, field, &field->usage[field->value[n] - min], 0, interrupt);
833 833
834 if (value[n] >= min && value[n] <= max 834 if (value[n] >= min && value[n] <= max
835 && field->usage[value[n] - min].hid 835 && field->usage[value[n] - min].hid
836 && search(field->value, value[n], count)) 836 && search(field->value, value[n], count))
837 hid_process_event(hid, field, &field->usage[value[n] - min], 1, interrupt, regs); 837 hid_process_event(hid, field, &field->usage[value[n] - min], 1, interrupt);
838 } 838 }
839 839
840 memcpy(field->value, value, count * sizeof(__s32)); 840 memcpy(field->value, value, count * sizeof(__s32));
@@ -842,7 +842,7 @@ exit:
842 kfree(value); 842 kfree(value);
843} 843}
844 844
845static int hid_input_report(int type, struct urb *urb, int interrupt, struct pt_regs *regs) 845static int hid_input_report(int type, struct urb *urb, int interrupt)
846{ 846{
847 struct hid_device *hid = urb->context; 847 struct hid_device *hid = urb->context;
848 struct hid_report_enum *report_enum = hid->report_enum + type; 848 struct hid_report_enum *report_enum = hid->report_enum + type;
@@ -892,7 +892,7 @@ static int hid_input_report(int type, struct urb *urb, int interrupt, struct pt_
892 hiddev_report_event(hid, report); 892 hiddev_report_event(hid, report);
893 893
894 for (n = 0; n < report->maxfield; n++) 894 for (n = 0; n < report->maxfield; n++)
895 hid_input_field(hid, report->field[n], data, interrupt, regs); 895 hid_input_field(hid, report->field[n], data, interrupt);
896 896
897 if (hid->claimed & HID_CLAIMED_INPUT) 897 if (hid->claimed & HID_CLAIMED_INPUT)
898 hidinput_report_event(hid, report); 898 hidinput_report_event(hid, report);
@@ -1004,7 +1004,7 @@ done:
1004 * Input interrupt completion handler. 1004 * Input interrupt completion handler.
1005 */ 1005 */
1006 1006
1007static void hid_irq_in(struct urb *urb, struct pt_regs *regs) 1007static void hid_irq_in(struct urb *urb)
1008{ 1008{
1009 struct hid_device *hid = urb->context; 1009 struct hid_device *hid = urb->context;
1010 int status; 1010 int status;
@@ -1012,7 +1012,7 @@ static void hid_irq_in(struct urb *urb, struct pt_regs *regs)
1012 switch (urb->status) { 1012 switch (urb->status) {
1013 case 0: /* success */ 1013 case 0: /* success */
1014 hid->retry_delay = 0; 1014 hid->retry_delay = 0;
1015 hid_input_report(HID_INPUT_REPORT, urb, 1, regs); 1015 hid_input_report(HID_INPUT_REPORT, urb, 1);
1016 break; 1016 break;
1017 case -ECONNRESET: /* unlink */ 1017 case -ECONNRESET: /* unlink */
1018 case -ENOENT: 1018 case -ENOENT:
@@ -1193,7 +1193,7 @@ static int hid_submit_ctrl(struct hid_device *hid)
1193 * Output interrupt completion handler. 1193 * Output interrupt completion handler.
1194 */ 1194 */
1195 1195
1196static void hid_irq_out(struct urb *urb, struct pt_regs *regs) 1196static void hid_irq_out(struct urb *urb)
1197{ 1197{
1198 struct hid_device *hid = urb->context; 1198 struct hid_device *hid = urb->context;
1199 unsigned long flags; 1199 unsigned long flags;
@@ -1238,7 +1238,7 @@ static void hid_irq_out(struct urb *urb, struct pt_regs *regs)
1238 * Control pipe completion handler. 1238 * Control pipe completion handler.
1239 */ 1239 */
1240 1240
1241static void hid_ctrl(struct urb *urb, struct pt_regs *regs) 1241static void hid_ctrl(struct urb *urb)
1242{ 1242{
1243 struct hid_device *hid = urb->context; 1243 struct hid_device *hid = urb->context;
1244 unsigned long flags; 1244 unsigned long flags;
@@ -1249,7 +1249,7 @@ static void hid_ctrl(struct urb *urb, struct pt_regs *regs)
1249 switch (urb->status) { 1249 switch (urb->status) {
1250 case 0: /* success */ 1250 case 0: /* success */
1251 if (hid->ctrl[hid->ctrltail].dir == USB_DIR_IN) 1251 if (hid->ctrl[hid->ctrltail].dir == USB_DIR_IN)
1252 hid_input_report(hid->ctrl[hid->ctrltail].report->type, urb, 0, regs); 1252 hid_input_report(hid->ctrl[hid->ctrltail].report->type, urb, 0);
1253 break; 1253 break;
1254 case -ESHUTDOWN: /* unplug */ 1254 case -ESHUTDOWN: /* unplug */
1255 unplug = 1; 1255 unplug = 1;
diff --git a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c
index 4c62afbeb430..9a808a3b4d37 100644
--- a/drivers/usb/input/hid-input.c
+++ b/drivers/usb/input/hid-input.c
@@ -613,7 +613,7 @@ ignore:
613 return; 613 return;
614} 614}
615 615
616void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value, struct pt_regs *regs) 616void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value)
617{ 617{
618 struct input_dev *input; 618 struct input_dev *input;
619 int *quirks = &hid->quirks; 619 int *quirks = &hid->quirks;
@@ -623,8 +623,6 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
623 623
624 input = field->hidinput->input; 624 input = field->hidinput->input;
625 625
626 input_regs(input, regs);
627
628 if (!usage->type) 626 if (!usage->type)
629 return; 627 return;
630 628
diff --git a/drivers/usb/input/hid.h b/drivers/usb/input/hid.h
index b03fd9b075df..9b50effef758 100644
--- a/drivers/usb/input/hid.h
+++ b/drivers/usb/input/hid.h
@@ -499,13 +499,13 @@ struct hid_descriptor {
499/* Applications from HID Usage Tables 4/8/99 Version 1.1 */ 499/* Applications from HID Usage Tables 4/8/99 Version 1.1 */
500/* We ignore a few input applications that are not widely used */ 500/* We ignore a few input applications that are not widely used */
501#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) 501#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001))
502extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32, struct pt_regs *regs); 502extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32);
503extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report); 503extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report);
504extern int hidinput_connect(struct hid_device *); 504extern int hidinput_connect(struct hid_device *);
505extern void hidinput_disconnect(struct hid_device *); 505extern void hidinput_disconnect(struct hid_device *);
506#else 506#else
507#define IS_INPUT_APPLICATION(a) (0) 507#define IS_INPUT_APPLICATION(a) (0)
508static inline void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value, struct pt_regs *regs) { } 508static inline void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value) { }
509static inline void hidinput_report_event(struct hid_device *hid, struct hid_report *report) { } 509static inline void hidinput_report_event(struct hid_device *hid, struct hid_report *report) { }
510static inline int hidinput_connect(struct hid_device *hid) { return -ENODEV; } 510static inline int hidinput_connect(struct hid_device *hid) { return -ENODEV; }
511static inline void hidinput_disconnect(struct hid_device *hid) { } 511static inline void hidinput_disconnect(struct hid_device *hid) { }
diff --git a/drivers/usb/input/hiddev.c b/drivers/usb/input/hiddev.c
index a2b419d13740..7dc14d0cacc1 100644
--- a/drivers/usb/input/hiddev.c
+++ b/drivers/usb/input/hiddev.c
@@ -179,7 +179,7 @@ static void hiddev_send_event(struct hid_device *hid,
179 * the interrupt pipe 179 * the interrupt pipe
180 */ 180 */
181void hiddev_hid_event(struct hid_device *hid, struct hid_field *field, 181void hiddev_hid_event(struct hid_device *hid, struct hid_field *field,
182 struct hid_usage *usage, __s32 value, struct pt_regs *regs) 182 struct hid_usage *usage, __s32 value)
183{ 183{
184 unsigned type = field->report_type; 184 unsigned type = field->report_type;
185 struct hiddev_usage_ref uref; 185 struct hiddev_usage_ref uref;
diff --git a/drivers/usb/input/itmtouch.c b/drivers/usb/input/itmtouch.c
index f3e3080de5b5..aac968aab860 100644
--- a/drivers/usb/input/itmtouch.c
+++ b/drivers/usb/input/itmtouch.c
@@ -80,7 +80,7 @@ static struct usb_device_id itmtouch_ids [] = {
80 { } 80 { }
81}; 81};
82 82
83static void itmtouch_irq(struct urb *urb, struct pt_regs *regs) 83static void itmtouch_irq(struct urb *urb)
84{ 84{
85 struct itmtouch_dev *itmtouch = urb->context; 85 struct itmtouch_dev *itmtouch = urb->context;
86 unsigned char *data = urb->transfer_buffer; 86 unsigned char *data = urb->transfer_buffer;
@@ -109,8 +109,6 @@ static void itmtouch_irq(struct urb *urb, struct pt_regs *regs)
109 goto exit; 109 goto exit;
110 } 110 }
111 111
112 input_regs(dev, regs);
113
114 /* if pressure has been released, then don't report X/Y */ 112 /* if pressure has been released, then don't report X/Y */
115 if (!(data[7] & 0x20)) { 113 if (!(data[7] & 0x20)) {
116 input_report_abs(dev, ABS_X, (data[0] & 0x1F) << 7 | (data[3] & 0x7F)); 114 input_report_abs(dev, ABS_X, (data[0] & 0x1F) << 7 | (data[3] & 0x7F));
diff --git a/drivers/usb/input/kbtab.c b/drivers/usb/input/kbtab.c
index 604ade356ead..fedbcb127c21 100644
--- a/drivers/usb/input/kbtab.c
+++ b/drivers/usb/input/kbtab.c
@@ -41,7 +41,7 @@ struct kbtab {
41 char phys[32]; 41 char phys[32];
42}; 42};
43 43
44static void kbtab_irq(struct urb *urb, struct pt_regs *regs) 44static void kbtab_irq(struct urb *urb)
45{ 45{
46 struct kbtab *kbtab = urb->context; 46 struct kbtab *kbtab = urb->context;
47 unsigned char *data = kbtab->data; 47 unsigned char *data = kbtab->data;
diff --git a/drivers/usb/input/keyspan_remote.c b/drivers/usb/input/keyspan_remote.c
index a90359551575..50aa8108a50b 100644
--- a/drivers/usb/input/keyspan_remote.c
+++ b/drivers/usb/input/keyspan_remote.c
@@ -176,7 +176,7 @@ static int keyspan_load_tester(struct usb_keyspan* dev, int bits_needed)
176/* 176/*
177 * Routine that handles all the logic needed to parse out the message from the remote. 177 * Routine that handles all the logic needed to parse out the message from the remote.
178 */ 178 */
179static void keyspan_check_data(struct usb_keyspan *remote, struct pt_regs *regs) 179static void keyspan_check_data(struct usb_keyspan *remote)
180{ 180{
181 int i; 181 int i;
182 int found = 0; 182 int found = 0;
@@ -311,7 +311,6 @@ static void keyspan_check_data(struct usb_keyspan *remote, struct pt_regs *regs)
311 __FUNCTION__, message.system, message.button, message.toggle); 311 __FUNCTION__, message.system, message.button, message.toggle);
312 312
313 if (message.toggle != remote->toggle) { 313 if (message.toggle != remote->toggle) {
314 input_regs(remote->input, regs);
315 input_report_key(remote->input, keyspan_key_table[message.button], 1); 314 input_report_key(remote->input, keyspan_key_table[message.button], 1);
316 input_report_key(remote->input, keyspan_key_table[message.button], 0); 315 input_report_key(remote->input, keyspan_key_table[message.button], 0);
317 input_sync(remote->input); 316 input_sync(remote->input);
@@ -361,7 +360,7 @@ static int keyspan_setup(struct usb_device* dev)
361/* 360/*
362 * Routine used to handle a new message that has come in. 361 * Routine used to handle a new message that has come in.
363 */ 362 */
364static void keyspan_irq_recv(struct urb *urb, struct pt_regs *regs) 363static void keyspan_irq_recv(struct urb *urb)
365{ 364{
366 struct usb_keyspan *dev = urb->context; 365 struct usb_keyspan *dev = urb->context;
367 int retval; 366 int retval;
@@ -385,7 +384,7 @@ static void keyspan_irq_recv(struct urb *urb, struct pt_regs *regs)
385 if (debug) 384 if (debug)
386 keyspan_print(dev); 385 keyspan_print(dev);
387 386
388 keyspan_check_data(dev, regs); 387 keyspan_check_data(dev);
389 388
390resubmit: 389resubmit:
391 retval = usb_submit_urb(urb, GFP_ATOMIC); 390 retval = usb_submit_urb(urb, GFP_ATOMIC);
diff --git a/drivers/usb/input/mtouchusb.c b/drivers/usb/input/mtouchusb.c
index 5dce951f2751..79a85d46cb13 100644
--- a/drivers/usb/input/mtouchusb.c
+++ b/drivers/usb/input/mtouchusb.c
@@ -98,7 +98,7 @@ static struct usb_device_id mtouchusb_devices[] = {
98 { } 98 { }
99}; 99};
100 100
101static void mtouchusb_irq(struct urb *urb, struct pt_regs *regs) 101static void mtouchusb_irq(struct urb *urb)
102{ 102{
103 struct mtouch_usb *mtouch = urb->context; 103 struct mtouch_usb *mtouch = urb->context;
104 int retval; 104 int retval;
@@ -125,7 +125,6 @@ static void mtouchusb_irq(struct urb *urb, struct pt_regs *regs)
125 goto exit; 125 goto exit;
126 } 126 }
127 127
128 input_regs(mtouch->input, regs);
129 input_report_key(mtouch->input, BTN_TOUCH, 128 input_report_key(mtouch->input, BTN_TOUCH,
130 MTOUCHUSB_GET_TOUCHED(mtouch->data)); 129 MTOUCHUSB_GET_TOUCHED(mtouch->data));
131 input_report_abs(mtouch->input, ABS_X, MTOUCHUSB_GET_XC(mtouch->data)); 130 input_report_abs(mtouch->input, ABS_X, MTOUCHUSB_GET_XC(mtouch->data));
diff --git a/drivers/usb/input/powermate.c b/drivers/usb/input/powermate.c
index f0f8db6810a2..0bf91778c40d 100644
--- a/drivers/usb/input/powermate.c
+++ b/drivers/usb/input/powermate.c
@@ -80,10 +80,10 @@ struct powermate_device {
80static char pm_name_powermate[] = "Griffin PowerMate"; 80static char pm_name_powermate[] = "Griffin PowerMate";
81static char pm_name_soundknob[] = "Griffin SoundKnob"; 81static char pm_name_soundknob[] = "Griffin SoundKnob";
82 82
83static void powermate_config_complete(struct urb *urb, struct pt_regs *regs); 83static void powermate_config_complete(struct urb *urb);
84 84
85/* Callback for data arriving from the PowerMate over the USB interrupt pipe */ 85/* Callback for data arriving from the PowerMate over the USB interrupt pipe */
86static void powermate_irq(struct urb *urb, struct pt_regs *regs) 86static void powermate_irq(struct urb *urb)
87{ 87{
88 struct powermate_device *pm = urb->context; 88 struct powermate_device *pm = urb->context;
89 int retval; 89 int retval;
@@ -104,7 +104,6 @@ static void powermate_irq(struct urb *urb, struct pt_regs *regs)
104 } 104 }
105 105
106 /* handle updates to device state */ 106 /* handle updates to device state */
107 input_regs(pm->input, regs);
108 input_report_key(pm->input, BTN_0, pm->data[0] & 0x01); 107 input_report_key(pm->input, BTN_0, pm->data[0] & 0x01);
109 input_report_rel(pm->input, REL_DIAL, pm->data[1]); 108 input_report_rel(pm->input, REL_DIAL, pm->data[1]);
110 input_sync(pm->input); 109 input_sync(pm->input);
@@ -191,7 +190,7 @@ static void powermate_sync_state(struct powermate_device *pm)
191} 190}
192 191
193/* Called when our asynchronous control message completes. We may need to issue another immediately */ 192/* Called when our asynchronous control message completes. We may need to issue another immediately */
194static void powermate_config_complete(struct urb *urb, struct pt_regs *regs) 193static void powermate_config_complete(struct urb *urb)
195{ 194{
196 struct powermate_device *pm = urb->context; 195 struct powermate_device *pm = urb->context;
197 unsigned long flags; 196 unsigned long flags;
diff --git a/drivers/usb/input/touchkitusb.c b/drivers/usb/input/touchkitusb.c
index 30b9f820e7a8..05c0d1ca39ab 100644
--- a/drivers/usb/input/touchkitusb.c
+++ b/drivers/usb/input/touchkitusb.c
@@ -92,8 +92,7 @@ static inline int touchkit_get_y(char *data)
92 92
93 93
94/* processes one input packet. */ 94/* processes one input packet. */
95static void touchkit_process_pkt(struct touchkit_usb *touchkit, 95static void touchkit_process_pkt(struct touchkit_usb *touchkit, char *pkt)
96 struct pt_regs *regs, char *pkt)
97{ 96{
98 int x, y; 97 int x, y;
99 98
@@ -109,7 +108,6 @@ static void touchkit_process_pkt(struct touchkit_usb *touchkit,
109 y = touchkit_get_y(pkt); 108 y = touchkit_get_y(pkt);
110 } 109 }
111 110
112 input_regs(touchkit->input, regs);
113 input_report_key(touchkit->input, BTN_TOUCH, touchkit_get_touched(pkt)); 111 input_report_key(touchkit->input, BTN_TOUCH, touchkit_get_touched(pkt));
114 input_report_abs(touchkit->input, ABS_X, x); 112 input_report_abs(touchkit->input, ABS_X, x);
115 input_report_abs(touchkit->input, ABS_Y, y); 113 input_report_abs(touchkit->input, ABS_Y, y);
@@ -130,8 +128,7 @@ static int touchkit_get_pkt_len(char *buf)
130 return 0; 128 return 0;
131} 129}
132 130
133static void touchkit_process(struct touchkit_usb *touchkit, int len, 131static void touchkit_process(struct touchkit_usb *touchkit, int len)
134 struct pt_regs *regs)
135{ 132{
136 char *buffer; 133 char *buffer;
137 int pkt_len, buf_len, pos; 134 int pkt_len, buf_len, pos;
@@ -153,7 +150,7 @@ static void touchkit_process(struct touchkit_usb *touchkit, int len,
153 /* append, process */ 150 /* append, process */
154 tmp = pkt_len - touchkit->buf_len; 151 tmp = pkt_len - touchkit->buf_len;
155 memcpy(touchkit->buffer + touchkit->buf_len, touchkit->data, tmp); 152 memcpy(touchkit->buffer + touchkit->buf_len, touchkit->data, tmp);
156 touchkit_process_pkt(touchkit, regs, touchkit->buffer); 153 touchkit_process_pkt(touchkit, touchkit->buffer);
157 154
158 buffer = touchkit->data + tmp; 155 buffer = touchkit->data + tmp;
159 buf_len = len - tmp; 156 buf_len = len - tmp;
@@ -181,7 +178,7 @@ static void touchkit_process(struct touchkit_usb *touchkit, int len,
181 178
182 /* full packet: process */ 179 /* full packet: process */
183 if (likely(pkt_len <= buf_len)) { 180 if (likely(pkt_len <= buf_len)) {
184 touchkit_process_pkt(touchkit, regs, buffer + pos); 181 touchkit_process_pkt(touchkit, buffer + pos);
185 } else { 182 } else {
186 /* incomplete packet: save in buffer */ 183 /* incomplete packet: save in buffer */
187 memcpy(touchkit->buffer, buffer + pos, buf_len - pos); 184 memcpy(touchkit->buffer, buffer + pos, buf_len - pos);
@@ -192,7 +189,7 @@ static void touchkit_process(struct touchkit_usb *touchkit, int len,
192} 189}
193 190
194 191
195static void touchkit_irq(struct urb *urb, struct pt_regs *regs) 192static void touchkit_irq(struct urb *urb)
196{ 193{
197 struct touchkit_usb *touchkit = urb->context; 194 struct touchkit_usb *touchkit = urb->context;
198 int retval; 195 int retval;
@@ -219,7 +216,7 @@ static void touchkit_irq(struct urb *urb, struct pt_regs *regs)
219 goto exit; 216 goto exit;
220 } 217 }
221 218
222 touchkit_process(touchkit, urb->actual_length, regs); 219 touchkit_process(touchkit, urb->actual_length);
223 220
224exit: 221exit:
225 retval = usb_submit_urb(urb, GFP_ATOMIC); 222 retval = usb_submit_urb(urb, GFP_ATOMIC);
diff --git a/drivers/usb/input/usbkbd.c b/drivers/usb/input/usbkbd.c
index 5067a6ae650f..c73285cf8558 100644
--- a/drivers/usb/input/usbkbd.c
+++ b/drivers/usb/input/usbkbd.c
@@ -80,7 +80,7 @@ struct usb_kbd {
80 dma_addr_t leds_dma; 80 dma_addr_t leds_dma;
81}; 81};
82 82
83static void usb_kbd_irq(struct urb *urb, struct pt_regs *regs) 83static void usb_kbd_irq(struct urb *urb)
84{ 84{
85 struct usb_kbd *kbd = urb->context; 85 struct usb_kbd *kbd = urb->context;
86 int i; 86 int i;
@@ -97,8 +97,6 @@ static void usb_kbd_irq(struct urb *urb, struct pt_regs *regs)
97 goto resubmit; 97 goto resubmit;
98 } 98 }
99 99
100 input_regs(kbd->dev, regs);
101
102 for (i = 0; i < 8; i++) 100 for (i = 0; i < 8; i++)
103 input_report_key(kbd->dev, usb_kbd_keycode[i + 224], (kbd->new[0] >> i) & 1); 101 input_report_key(kbd->dev, usb_kbd_keycode[i + 224], (kbd->new[0] >> i) & 1);
104 102
@@ -158,7 +156,7 @@ static int usb_kbd_event(struct input_dev *dev, unsigned int type,
158 return 0; 156 return 0;
159} 157}
160 158
161static void usb_kbd_led(struct urb *urb, struct pt_regs *regs) 159static void usb_kbd_led(struct urb *urb)
162{ 160{
163 struct usb_kbd *kbd = urb->context; 161 struct usb_kbd *kbd = urb->context;
164 162
diff --git a/drivers/usb/input/usbmouse.c b/drivers/usb/input/usbmouse.c
index 0fb792be95ef..cbbbea332ed7 100644
--- a/drivers/usb/input/usbmouse.c
+++ b/drivers/usb/input/usbmouse.c
@@ -55,7 +55,7 @@ struct usb_mouse {
55 dma_addr_t data_dma; 55 dma_addr_t data_dma;
56}; 56};
57 57
58static void usb_mouse_irq(struct urb *urb, struct pt_regs *regs) 58static void usb_mouse_irq(struct urb *urb)
59{ 59{
60 struct usb_mouse *mouse = urb->context; 60 struct usb_mouse *mouse = urb->context;
61 signed char *data = mouse->data; 61 signed char *data = mouse->data;
@@ -74,8 +74,6 @@ static void usb_mouse_irq(struct urb *urb, struct pt_regs *regs)
74 goto resubmit; 74 goto resubmit;
75 } 75 }
76 76
77 input_regs(dev, regs);
78
79 input_report_key(dev, BTN_LEFT, data[0] & 0x01); 77 input_report_key(dev, BTN_LEFT, data[0] & 0x01);
80 input_report_key(dev, BTN_RIGHT, data[0] & 0x02); 78 input_report_key(dev, BTN_RIGHT, data[0] & 0x02);
81 input_report_key(dev, BTN_MIDDLE, data[0] & 0x04); 79 input_report_key(dev, BTN_MIDDLE, data[0] & 0x04);
diff --git a/drivers/usb/input/usbtouchscreen.c b/drivers/usb/input/usbtouchscreen.c
index 923e22db18d4..f26c1cd1129f 100644
--- a/drivers/usb/input/usbtouchscreen.c
+++ b/drivers/usb/input/usbtouchscreen.c
@@ -61,7 +61,7 @@ struct usbtouch_device_info {
61 int rept_size; 61 int rept_size;
62 int flags; 62 int flags;
63 63
64 void (*process_pkt) (struct usbtouch_usb *usbtouch, struct pt_regs *regs, unsigned char *pkt, int len); 64 void (*process_pkt) (struct usbtouch_usb *usbtouch, unsigned char *pkt, int len);
65 int (*get_pkt_len) (unsigned char *pkt, int len); 65 int (*get_pkt_len) (unsigned char *pkt, int len);
66 int (*read_data) (unsigned char *pkt, int *x, int *y, int *touch, int *press); 66 int (*read_data) (unsigned char *pkt, int *x, int *y, int *touch, int *press);
67 int (*init) (struct usbtouch_usb *usbtouch); 67 int (*init) (struct usbtouch_usb *usbtouch);
@@ -91,7 +91,6 @@ struct usbtouch_usb {
91 91
92#ifdef MULTI_PACKET 92#ifdef MULTI_PACKET
93static void usbtouch_process_multi(struct usbtouch_usb *usbtouch, 93static void usbtouch_process_multi(struct usbtouch_usb *usbtouch,
94 struct pt_regs *regs,
95 unsigned char *pkt, int len); 94 unsigned char *pkt, int len);
96#endif 95#endif
97 96
@@ -397,7 +396,7 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
397 * Generic Part 396 * Generic Part
398 */ 397 */
399static void usbtouch_process_pkt(struct usbtouch_usb *usbtouch, 398static void usbtouch_process_pkt(struct usbtouch_usb *usbtouch,
400 struct pt_regs *regs, unsigned char *pkt, int len) 399 unsigned char *pkt, int len)
401{ 400{
402 int x, y, touch, press; 401 int x, y, touch, press;
403 struct usbtouch_device_info *type = usbtouch->type; 402 struct usbtouch_device_info *type = usbtouch->type;
@@ -405,7 +404,6 @@ static void usbtouch_process_pkt(struct usbtouch_usb *usbtouch,
405 if (!type->read_data(pkt, &x, &y, &touch, &press)) 404 if (!type->read_data(pkt, &x, &y, &touch, &press))
406 return; 405 return;
407 406
408 input_regs(usbtouch->input, regs);
409 input_report_key(usbtouch->input, BTN_TOUCH, touch); 407 input_report_key(usbtouch->input, BTN_TOUCH, touch);
410 408
411 if (swap_xy) { 409 if (swap_xy) {
@@ -423,7 +421,6 @@ static void usbtouch_process_pkt(struct usbtouch_usb *usbtouch,
423 421
424#ifdef MULTI_PACKET 422#ifdef MULTI_PACKET
425static void usbtouch_process_multi(struct usbtouch_usb *usbtouch, 423static void usbtouch_process_multi(struct usbtouch_usb *usbtouch,
426 struct pt_regs *regs,
427 unsigned char *pkt, int len) 424 unsigned char *pkt, int len)
428{ 425{
429 unsigned char *buffer; 426 unsigned char *buffer;
@@ -460,7 +457,7 @@ static void usbtouch_process_multi(struct usbtouch_usb *usbtouch,
460 if (usbtouch->buf_len + tmp >= usbtouch->type->rept_size) 457 if (usbtouch->buf_len + tmp >= usbtouch->type->rept_size)
461 goto out_flush_buf; 458 goto out_flush_buf;
462 memcpy(usbtouch->buffer + usbtouch->buf_len, pkt, tmp); 459 memcpy(usbtouch->buffer + usbtouch->buf_len, pkt, tmp);
463 usbtouch_process_pkt(usbtouch, regs, usbtouch->buffer, pkt_len); 460 usbtouch_process_pkt(usbtouch, usbtouch->buffer, pkt_len);
464 461
465 buffer = pkt + tmp; 462 buffer = pkt + tmp;
466 buf_len = len - tmp; 463 buf_len = len - tmp;
@@ -481,7 +478,7 @@ static void usbtouch_process_multi(struct usbtouch_usb *usbtouch,
481 478
482 /* full packet: process */ 479 /* full packet: process */
483 if (likely((pkt_len > 0) && (pkt_len <= buf_len - pos))) { 480 if (likely((pkt_len > 0) && (pkt_len <= buf_len - pos))) {
484 usbtouch_process_pkt(usbtouch, regs, buffer + pos, pkt_len); 481 usbtouch_process_pkt(usbtouch, buffer + pos, pkt_len);
485 } else { 482 } else {
486 /* incomplete packet: save in buffer */ 483 /* incomplete packet: save in buffer */
487 memcpy(usbtouch->buffer, buffer + pos, buf_len - pos); 484 memcpy(usbtouch->buffer, buffer + pos, buf_len - pos);
@@ -498,7 +495,7 @@ out_flush_buf:
498#endif 495#endif
499 496
500 497
501static void usbtouch_irq(struct urb *urb, struct pt_regs *regs) 498static void usbtouch_irq(struct urb *urb)
502{ 499{
503 struct usbtouch_usb *usbtouch = urb->context; 500 struct usbtouch_usb *usbtouch = urb->context;
504 int retval; 501 int retval;
@@ -525,7 +522,7 @@ static void usbtouch_irq(struct urb *urb, struct pt_regs *regs)
525 goto exit; 522 goto exit;
526 } 523 }
527 524
528 usbtouch->type->process_pkt(usbtouch, regs, usbtouch->data, urb->actual_length); 525 usbtouch->type->process_pkt(usbtouch, usbtouch->data, urb->actual_length);
529 526
530exit: 527exit:
531 retval = usb_submit_urb(urb, GFP_ATOMIC); 528 retval = usb_submit_urb(urb, GFP_ATOMIC);
diff --git a/drivers/usb/input/wacom.h b/drivers/usb/input/wacom.h
index 832737b658cf..7b3840e378a8 100644
--- a/drivers/usb/input/wacom.h
+++ b/drivers/usb/input/wacom.h
@@ -106,16 +106,14 @@ struct wacom {
106struct wacom_combo { 106struct wacom_combo {
107 struct wacom * wacom; 107 struct wacom * wacom;
108 struct urb * urb; 108 struct urb * urb;
109 struct pt_regs *regs;
110}; 109};
111 110
112extern int wacom_wac_irq(struct wacom_wac * wacom_wac, void * wcombo); 111extern int wacom_wac_irq(struct wacom_wac * wacom_wac, void * wcombo);
113extern void wacom_sys_irq(struct urb *urb, struct pt_regs *regs); 112extern void wacom_sys_irq(struct urb *urb);
114extern void wacom_report_abs(void *wcombo, unsigned int abs_type, int abs_data); 113extern void wacom_report_abs(void *wcombo, unsigned int abs_type, int abs_data);
115extern void wacom_report_rel(void *wcombo, unsigned int rel_type, int rel_data); 114extern void wacom_report_rel(void *wcombo, unsigned int rel_type, int rel_data);
116extern void wacom_report_key(void *wcombo, unsigned int key_type, int key_data); 115extern void wacom_report_key(void *wcombo, unsigned int key_type, int key_data);
117extern void wacom_input_event(void *wcombo, unsigned int type, unsigned int code, int value); 116extern void wacom_input_event(void *wcombo, unsigned int type, unsigned int code, int value);
118extern void wacom_input_regs(void *wcombo);
119extern void wacom_input_sync(void *wcombo); 117extern void wacom_input_sync(void *wcombo);
120extern void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_wac); 118extern void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
121extern void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac); 119extern void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
diff --git a/drivers/usb/input/wacom_sys.c b/drivers/usb/input/wacom_sys.c
index 7c3b52bdd9d6..d233c37bd533 100644
--- a/drivers/usb/input/wacom_sys.c
+++ b/drivers/usb/input/wacom_sys.c
@@ -42,7 +42,7 @@ static struct input_dev * get_input_dev(struct wacom_combo *wcombo)
42 return wcombo->wacom->dev; 42 return wcombo->wacom->dev;
43} 43}
44 44
45void wacom_sys_irq(struct urb *urb, struct pt_regs *regs) 45void wacom_sys_irq(struct urb *urb)
46{ 46{
47 struct wacom *wacom = urb->context; 47 struct wacom *wacom = urb->context;
48 struct wacom_combo wcombo; 48 struct wacom_combo wcombo;
@@ -65,7 +65,6 @@ void wacom_sys_irq(struct urb *urb, struct pt_regs *regs)
65 65
66 wcombo.wacom = wacom; 66 wcombo.wacom = wacom;
67 wcombo.urb = urb; 67 wcombo.urb = urb;
68 wcombo.regs = regs;
69 68
70 if (wacom_wac_irq(wacom->wacom_wac, (void *)&wcombo)) 69 if (wacom_wac_irq(wacom->wacom_wac, (void *)&wcombo))
71 input_sync(get_input_dev(&wcombo)); 70 input_sync(get_input_dev(&wcombo));
@@ -115,12 +114,6 @@ __u16 wacom_le16_to_cpu(unsigned char *data)
115 return value; 114 return value;
116} 115}
117 116
118void wacom_input_regs(void *wcombo)
119{
120 input_regs(get_input_dev((struct wacom_combo *)wcombo), ((struct wacom_combo *)wcombo)->regs);
121 return;
122}
123
124void wacom_input_sync(void *wcombo) 117void wacom_input_sync(void *wcombo)
125{ 118{
126 input_sync(get_input_dev((struct wacom_combo *)wcombo)); 119 input_sync(get_input_dev((struct wacom_combo *)wcombo));
diff --git a/drivers/usb/input/wacom_wac.c b/drivers/usb/input/wacom_wac.c
index 85d458c98b6e..aa31d22d4f05 100644
--- a/drivers/usb/input/wacom_wac.c
+++ b/drivers/usb/input/wacom_wac.c
@@ -20,7 +20,6 @@ static int wacom_penpartner_irq(struct wacom_wac *wacom, void *wcombo)
20 20
21 switch (data[0]) { 21 switch (data[0]) {
22 case 1: 22 case 1:
23 wacom_input_regs(wcombo);
24 if (data[5] & 0x80) { 23 if (data[5] & 0x80) {
25 wacom->tool[0] = (data[5] & 0x20) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN; 24 wacom->tool[0] = (data[5] & 0x20) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN;
26 wacom->id[0] = (data[5] & 0x20) ? ERASER_DEVICE_ID : STYLUS_DEVICE_ID; 25 wacom->id[0] = (data[5] & 0x20) ? ERASER_DEVICE_ID : STYLUS_DEVICE_ID;
@@ -39,7 +38,6 @@ static int wacom_penpartner_irq(struct wacom_wac *wacom, void *wcombo)
39 } 38 }
40 break; 39 break;
41 case 2: 40 case 2:
42 wacom_input_regs(wcombo);
43 wacom_report_key(wcombo, BTN_TOOL_PEN, 1); 41 wacom_report_key(wcombo, BTN_TOOL_PEN, 1);
44 wacom_report_abs(wcombo, ABS_MISC, STYLUS_DEVICE_ID); /* report tool id */ 42 wacom_report_abs(wcombo, ABS_MISC, STYLUS_DEVICE_ID); /* report tool id */
45 wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[1])); 43 wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[1]));
@@ -67,8 +65,6 @@ static int wacom_pl_irq(struct wacom_wac *wacom, void *wcombo)
67 65
68 prox = data[1] & 0x40; 66 prox = data[1] & 0x40;
69 67
70 wacom_input_regs(wcombo);
71
72 id = ERASER_DEVICE_ID; 68 id = ERASER_DEVICE_ID;
73 if (prox) { 69 if (prox) {
74 70
@@ -138,7 +134,6 @@ static int wacom_ptu_irq(struct wacom_wac *wacom, void *wcombo)
138 return 0; 134 return 0;
139 } 135 }
140 136
141 wacom_input_regs(wcombo);
142 if (data[1] & 0x04) { 137 if (data[1] & 0x04) {
143 wacom_report_key(wcombo, BTN_TOOL_RUBBER, data[1] & 0x20); 138 wacom_report_key(wcombo, BTN_TOOL_RUBBER, data[1] & 0x20);
144 wacom_report_key(wcombo, BTN_TOUCH, data[1] & 0x08); 139 wacom_report_key(wcombo, BTN_TOUCH, data[1] & 0x08);
@@ -167,8 +162,6 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo)
167 return 0; 162 return 0;
168 } 163 }
169 164
170 wacom_input_regs(wcombo);
171
172 id = STYLUS_DEVICE_ID; 165 id = STYLUS_DEVICE_ID;
173 if (data[1] & 0x10) { /* in prox */ 166 if (data[1] & 0x10) { /* in prox */
174 167
@@ -369,8 +362,6 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo)
369 return 0; 362 return 0;
370 } 363 }
371 364
372 wacom_input_regs(wcombo);
373
374 /* tool number */ 365 /* tool number */
375 idx = data[1] & 0x01; 366 idx = data[1] & 0x01;
376 367
diff --git a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c
index 9889b1cda05b..cebb6c463bfb 100644
--- a/drivers/usb/input/xpad.c
+++ b/drivers/usb/input/xpad.c
@@ -120,12 +120,10 @@ struct usb_xpad {
120 * http://euc.jp/periphs/xbox-controller.ja.html 120 * http://euc.jp/periphs/xbox-controller.ja.html
121 */ 121 */
122 122
123static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *data, struct pt_regs *regs) 123static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *data)
124{ 124{
125 struct input_dev *dev = xpad->dev; 125 struct input_dev *dev = xpad->dev;
126 126
127 input_regs(dev, regs);
128
129 /* left stick */ 127 /* left stick */
130 input_report_abs(dev, ABS_X, (__s16) (((__s16)data[13] << 8) | data[12])); 128 input_report_abs(dev, ABS_X, (__s16) (((__s16)data[13] << 8) | data[12]));
131 input_report_abs(dev, ABS_Y, (__s16) (((__s16)data[15] << 8) | data[14])); 129 input_report_abs(dev, ABS_Y, (__s16) (((__s16)data[15] << 8) | data[14]));
@@ -161,7 +159,7 @@ static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *d
161 input_sync(dev); 159 input_sync(dev);
162} 160}
163 161
164static void xpad_irq_in(struct urb *urb, struct pt_regs *regs) 162static void xpad_irq_in(struct urb *urb)
165{ 163{
166 struct usb_xpad *xpad = urb->context; 164 struct usb_xpad *xpad = urb->context;
167 int retval; 165 int retval;
@@ -181,7 +179,7 @@ static void xpad_irq_in(struct urb *urb, struct pt_regs *regs)
181 goto exit; 179 goto exit;
182 } 180 }
183 181
184 xpad_process_packet(xpad, 0, xpad->idata, regs); 182 xpad_process_packet(xpad, 0, xpad->idata);
185 183
186exit: 184exit:
187 retval = usb_submit_urb (urb, GFP_ATOMIC); 185 retval = usb_submit_urb (urb, GFP_ATOMIC);
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c
index 7291e7a2717b..905bf6398257 100644
--- a/drivers/usb/input/yealink.c
+++ b/drivers/usb/input/yealink.c
@@ -233,11 +233,10 @@ static int map_p1k_to_key(int scancode)
233 * 233 *
234 * The key parameter can be cascaded: key2 << 8 | key1 234 * The key parameter can be cascaded: key2 << 8 | key1
235 */ 235 */
236static void report_key(struct yealink_dev *yld, int key, struct pt_regs *regs) 236static void report_key(struct yealink_dev *yld, int key)
237{ 237{
238 struct input_dev *idev = yld->idev; 238 struct input_dev *idev = yld->idev;
239 239
240 input_regs(idev, regs);
241 if (yld->key_code >= 0) { 240 if (yld->key_code >= 0) {
242 /* old key up */ 241 /* old key up */
243 input_report_key(idev, yld->key_code & 0xff, 0); 242 input_report_key(idev, yld->key_code & 0xff, 0);
@@ -422,7 +421,7 @@ send_update:
422 * error,start 421 * error,start
423 * 422 *
424 */ 423 */
425static void urb_irq_callback(struct urb *urb, struct pt_regs *regs) 424static void urb_irq_callback(struct urb *urb)
426{ 425{
427 struct yealink_dev *yld = urb->context; 426 struct yealink_dev *yld = urb->context;
428 int ret; 427 int ret;
@@ -439,7 +438,7 @@ static void urb_irq_callback(struct urb *urb, struct pt_regs *regs)
439 case CMD_SCANCODE: 438 case CMD_SCANCODE:
440 dbg("get scancode %x", yld->irq_data->data[0]); 439 dbg("get scancode %x", yld->irq_data->data[0]);
441 440
442 report_key(yld, map_p1k_to_key(yld->irq_data->data[0]), regs); 441 report_key(yld, map_p1k_to_key(yld->irq_data->data[0]));
443 break; 442 break;
444 443
445 default: 444 default:
@@ -453,7 +452,7 @@ static void urb_irq_callback(struct urb *urb, struct pt_regs *regs)
453 err("%s - usb_submit_urb failed %d", __FUNCTION__, ret); 452 err("%s - usb_submit_urb failed %d", __FUNCTION__, ret);
454} 453}
455 454
456static void urb_ctl_callback(struct urb *urb, struct pt_regs *regs) 455static void urb_ctl_callback(struct urb *urb)
457{ 456{
458 struct yealink_dev *yld = urb->context; 457 struct yealink_dev *yld = urb->context;
459 int ret; 458 int ret;