aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/stinger.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-05 19:32:01 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-05 19:32:01 -0400
commit44aefd2706bb6f5b65ba2c38cd89e7609e2b43d3 (patch)
tree93824f573767da634fbc82c388b6d33cc454212b /drivers/input/joystick/stinger.c
parentc1a26e7d40fb814716950122353a1a556844286b (diff)
parent7d12e780e003f93433d49ce78cfedf4b4c52adc5 (diff)
Merge git://git.infradead.org/~dhowells/irq-2.6
* git://git.infradead.org/~dhowells/irq-2.6: IRQ: Maintain regs pointer globally rather than passing to IRQ handlers IRQ: Typedef the IRQ handler function type IRQ: Typedef the IRQ flow handler function type
Diffstat (limited to 'drivers/input/joystick/stinger.c')
-rw-r--r--drivers/input/joystick/stinger.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/input/joystick/stinger.c b/drivers/input/joystick/stinger.c
index 011ec4858e15..1ffb03223311 100644
--- a/drivers/input/joystick/stinger.c
+++ b/drivers/input/joystick/stinger.c
@@ -64,15 +64,13 @@ struct stinger {
64 * Stinger. It updates the data accordingly. 64 * Stinger. It updates the data accordingly.
65 */ 65 */
66 66
67static void stinger_process_packet(struct stinger *stinger, struct pt_regs *regs) 67static void stinger_process_packet(struct stinger *stinger)
68{ 68{
69 struct input_dev *dev = stinger->dev; 69 struct input_dev *dev = stinger->dev;
70 unsigned char *data = stinger->data; 70 unsigned char *data = stinger->data;
71 71
72 if (!stinger->idx) return; 72 if (!stinger->idx) return;
73 73
74 input_regs(dev, regs);
75
76 input_report_key(dev, BTN_A, ((data[0] & 0x20) >> 5)); 74 input_report_key(dev, BTN_A, ((data[0] & 0x20) >> 5));
77 input_report_key(dev, BTN_B, ((data[0] & 0x10) >> 4)); 75 input_report_key(dev, BTN_B, ((data[0] & 0x10) >> 4));
78 input_report_key(dev, BTN_C, ((data[0] & 0x08) >> 3)); 76 input_report_key(dev, BTN_C, ((data[0] & 0x08) >> 3));
@@ -99,7 +97,7 @@ static void stinger_process_packet(struct stinger *stinger, struct pt_regs *regs
99 */ 97 */
100 98
101static irqreturn_t stinger_interrupt(struct serio *serio, 99static irqreturn_t stinger_interrupt(struct serio *serio,
102 unsigned char data, unsigned int flags, struct pt_regs *regs) 100 unsigned char data, unsigned int flags)
103{ 101{
104 struct stinger *stinger = serio_get_drvdata(serio); 102 struct stinger *stinger = serio_get_drvdata(serio);
105 103
@@ -109,7 +107,7 @@ static irqreturn_t stinger_interrupt(struct serio *serio,
109 stinger->data[stinger->idx++] = data; 107 stinger->data[stinger->idx++] = data;
110 108
111 if (stinger->idx == 4) { 109 if (stinger->idx == 4) {
112 stinger_process_packet(stinger, regs); 110 stinger_process_packet(stinger);
113 stinger->idx = 0; 111 stinger->idx = 0;
114 } 112 }
115 113