diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-05 16:32:01 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-05 16:32:01 -0700 |
commit | 44aefd2706bb6f5b65ba2c38cd89e7609e2b43d3 (patch) | |
tree | 93824f573767da634fbc82c388b6d33cc454212b /drivers/input/joystick | |
parent | c1a26e7d40fb814716950122353a1a556844286b (diff) | |
parent | 7d12e780e003f93433d49ce78cfedf4b4c52adc5 (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')
-rw-r--r-- | drivers/input/joystick/amijoy.c | 4 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce-packets.c | 6 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce-serio.c | 4 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce-usb.c | 8 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce.h | 2 | ||||
-rw-r--r-- | drivers/input/joystick/magellan.c | 8 | ||||
-rw-r--r-- | drivers/input/joystick/spaceball.c | 8 | ||||
-rw-r--r-- | drivers/input/joystick/spaceorb.c | 8 | ||||
-rw-r--r-- | drivers/input/joystick/stinger.c | 8 | ||||
-rw-r--r-- | drivers/input/joystick/twidjoy.c | 8 | ||||
-rw-r--r-- | drivers/input/joystick/warrior.c | 10 |
11 files changed, 28 insertions, 46 deletions
diff --git a/drivers/input/joystick/amijoy.c b/drivers/input/joystick/amijoy.c index 7249d324297..650acf3a30b 100644 --- a/drivers/input/joystick/amijoy.c +++ b/drivers/input/joystick/amijoy.c @@ -57,7 +57,7 @@ static DEFINE_MUTEX(amijoy_mutex); static struct input_dev *amijoy_dev[2]; static char *amijoy_phys[2] = { "amijoy/input0", "amijoy/input1" }; -static irqreturn_t amijoy_interrupt(int irq, void *dummy, struct pt_regs *fp) +static irqreturn_t amijoy_interrupt(int irq, void *dummy) { int i, data = 0, button = 0; @@ -69,8 +69,6 @@ static irqreturn_t amijoy_interrupt(int irq, void *dummy, struct pt_regs *fp) case 1: data = ~amiga_custom.joy1dat; button = (~ciaa.pra >> 7) & 1; break; } - input_regs(amijoy_dev[i], fp); - input_report_key(amijoy_dev[i], BTN_TRIGGER, button); input_report_abs(amijoy_dev[i], ABS_X, ((data >> 1) & 1) - ((data >> 9) & 1)); diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index 8632d47a7fb..808f05932a6 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c @@ -155,7 +155,7 @@ static int mark_core_as_ready(struct iforce *iforce, unsigned short addr) return -1; } -void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data, struct pt_regs *regs) +void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data) { struct input_dev *dev = iforce->dev; int i; @@ -183,9 +183,6 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data, case 0x01: /* joystick position data */ case 0x03: /* wheel position data */ - - input_regs(dev, regs); - if (HI(cmd) == 1) { input_report_abs(dev, ABS_X, (__s16) (((__s16)data[1] << 8) | data[0])); input_report_abs(dev, ABS_Y, (__s16) (((__s16)data[3] << 8) | data[2])); @@ -224,7 +221,6 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data, break; case 0x02: /* status report */ - input_regs(dev, regs); input_report_key(dev, BTN_DEAD, data[0] & 0x02); input_sync(dev); diff --git a/drivers/input/joystick/iforce/iforce-serio.c b/drivers/input/joystick/iforce/iforce-serio.c index 64a78c51548..ca08f45c204 100644 --- a/drivers/input/joystick/iforce/iforce-serio.c +++ b/drivers/input/joystick/iforce/iforce-serio.c @@ -81,7 +81,7 @@ static void iforce_serio_write_wakeup(struct serio *serio) } static irqreturn_t iforce_serio_irq(struct serio *serio, - unsigned char data, unsigned int flags, struct pt_regs *regs) + unsigned char data, unsigned int flags) { struct iforce *iforce = serio_get_drvdata(serio); @@ -115,7 +115,7 @@ static irqreturn_t iforce_serio_irq(struct serio *serio, } if (iforce->idx == iforce->len) { - iforce_process_packet(iforce, (iforce->id << 8) | iforce->idx, iforce->data, regs); + iforce_process_packet(iforce, (iforce->id << 8) | iforce->idx, iforce->data); iforce->pkt = 0; iforce->id = 0; iforce->len = 0; diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index fe79d158456..105112fb7b5 100644 --- a/drivers/input/joystick/iforce/iforce-usb.c +++ b/drivers/input/joystick/iforce/iforce-usb.c @@ -74,7 +74,7 @@ void iforce_usb_xmit(struct iforce *iforce) spin_unlock_irqrestore(&iforce->xmit_lock, flags); } -static void iforce_usb_irq(struct urb *urb, struct pt_regs *regs) +static void iforce_usb_irq(struct urb *urb) { struct iforce *iforce = urb->context; int status; @@ -96,7 +96,7 @@ static void iforce_usb_irq(struct urb *urb, struct pt_regs *regs) } iforce_process_packet(iforce, - (iforce->data[0] << 8) | (urb->actual_length - 1), iforce->data + 1, regs); + (iforce->data[0] << 8) | (urb->actual_length - 1), iforce->data + 1); exit: status = usb_submit_urb (urb, GFP_ATOMIC); @@ -105,7 +105,7 @@ exit: __FUNCTION__, status); } -static void iforce_usb_out(struct urb *urb, struct pt_regs *regs) +static void iforce_usb_out(struct urb *urb) { struct iforce *iforce = urb->context; @@ -119,7 +119,7 @@ static void iforce_usb_out(struct urb *urb, struct pt_regs *regs) wake_up(&iforce->wait); } -static void iforce_usb_ctrl(struct urb *urb, struct pt_regs *regs) +static void iforce_usb_ctrl(struct urb *urb) { struct iforce *iforce = urb->context; if (urb->status) return; diff --git a/drivers/input/joystick/iforce/iforce.h b/drivers/input/joystick/iforce/iforce.h index 947df273984..ffaeaefa1a4 100644 --- a/drivers/input/joystick/iforce/iforce.h +++ b/drivers/input/joystick/iforce/iforce.h @@ -160,7 +160,7 @@ void iforce_delete_device(struct iforce *iforce); /* iforce-packets.c */ int iforce_control_playback(struct iforce*, u16 id, unsigned int); -void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data, struct pt_regs *regs); +void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data); int iforce_send_packet(struct iforce *iforce, u16 cmd, unsigned char* data); void iforce_dump_packet(char *msg, u16 cmd, unsigned char *data) ; int iforce_get_id_packet(struct iforce *iforce, char *packet); diff --git a/drivers/input/joystick/magellan.c b/drivers/input/joystick/magellan.c index 168b1061a03..e3d19444ba2 100644 --- a/drivers/input/joystick/magellan.c +++ b/drivers/input/joystick/magellan.c @@ -82,7 +82,7 @@ static int magellan_crunch_nibbles(unsigned char *data, int count) return 0; } -static void magellan_process_packet(struct magellan* magellan, struct pt_regs *regs) +static void magellan_process_packet(struct magellan* magellan) { struct input_dev *dev = magellan->dev; unsigned char *data = magellan->data; @@ -90,8 +90,6 @@ static void magellan_process_packet(struct magellan* magellan, struct pt_regs *r if (!magellan->idx) return; - input_regs(dev, regs); - switch (magellan->data[0]) { case 'd': /* Axis data */ @@ -115,12 +113,12 @@ static void magellan_process_packet(struct magellan* magellan, struct pt_regs *r } static irqreturn_t magellan_interrupt(struct serio *serio, - unsigned char data, unsigned int flags, struct pt_regs *regs) + unsigned char data, unsigned int flags) { struct magellan* magellan = serio_get_drvdata(serio); if (data == '\r') { - magellan_process_packet(magellan, regs); + magellan_process_packet(magellan); magellan->idx = 0; } else { if (magellan->idx < MAGELLAN_MAX_LENGTH) diff --git a/drivers/input/joystick/spaceball.c b/drivers/input/joystick/spaceball.c index 7a19ee05297..2a9808cf826 100644 --- a/drivers/input/joystick/spaceball.c +++ b/drivers/input/joystick/spaceball.c @@ -82,7 +82,7 @@ struct spaceball { * SpaceBall. */ -static void spaceball_process_packet(struct spaceball* spaceball, struct pt_regs *regs) +static void spaceball_process_packet(struct spaceball* spaceball) { struct input_dev *dev = spaceball->dev; unsigned char *data = spaceball->data; @@ -90,8 +90,6 @@ static void spaceball_process_packet(struct spaceball* spaceball, struct pt_regs if (spaceball->idx < 2) return; - input_regs(dev, regs); - switch (spaceball->data[0]) { case 'D': /* Ball data */ @@ -151,13 +149,13 @@ static void spaceball_process_packet(struct spaceball* spaceball, struct pt_regs */ static irqreturn_t spaceball_interrupt(struct serio *serio, - unsigned char data, unsigned int flags, struct pt_regs *regs) + unsigned char data, unsigned int flags) { struct spaceball *spaceball = serio_get_drvdata(serio); switch (data) { case 0xd: - spaceball_process_packet(spaceball, regs); + spaceball_process_packet(spaceball); spaceball->idx = 0; spaceball->escape = 0; break; diff --git a/drivers/input/joystick/spaceorb.c b/drivers/input/joystick/spaceorb.c index 3e2782e7983..c4db0247c5f 100644 --- a/drivers/input/joystick/spaceorb.c +++ b/drivers/input/joystick/spaceorb.c @@ -74,7 +74,7 @@ static unsigned char *spaceorb_errors[] = { "EEPROM storing 0 failed", "Receive * SpaceOrb. */ -static void spaceorb_process_packet(struct spaceorb *spaceorb, struct pt_regs *regs) +static void spaceorb_process_packet(struct spaceorb *spaceorb) { struct input_dev *dev = spaceorb->dev; unsigned char *data = spaceorb->data; @@ -86,8 +86,6 @@ static void spaceorb_process_packet(struct spaceorb *spaceorb, struct pt_regs *r for (i = 0; i < spaceorb->idx; i++) c ^= data[i]; if (c) return; - input_regs(dev, regs); - switch (data[0]) { case 'R': /* Reset packet */ @@ -131,12 +129,12 @@ static void spaceorb_process_packet(struct spaceorb *spaceorb, struct pt_regs *r } static irqreturn_t spaceorb_interrupt(struct serio *serio, - unsigned char data, unsigned int flags, struct pt_regs *regs) + unsigned char data, unsigned int flags) { struct spaceorb* spaceorb = serio_get_drvdata(serio); if (~data & 0x80) { - if (spaceorb->idx) spaceorb_process_packet(spaceorb, regs); + if (spaceorb->idx) spaceorb_process_packet(spaceorb); spaceorb->idx = 0; } if (spaceorb->idx < SPACEORB_MAX_LENGTH) diff --git a/drivers/input/joystick/stinger.c b/drivers/input/joystick/stinger.c index 011ec4858e1..1ffb0322331 100644 --- a/drivers/input/joystick/stinger.c +++ b/drivers/input/joystick/stinger.c @@ -64,15 +64,13 @@ struct stinger { * Stinger. It updates the data accordingly. */ -static void stinger_process_packet(struct stinger *stinger, struct pt_regs *regs) +static void stinger_process_packet(struct stinger *stinger) { struct input_dev *dev = stinger->dev; unsigned char *data = stinger->data; if (!stinger->idx) return; - input_regs(dev, regs); - input_report_key(dev, BTN_A, ((data[0] & 0x20) >> 5)); input_report_key(dev, BTN_B, ((data[0] & 0x10) >> 4)); 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 */ static irqreturn_t stinger_interrupt(struct serio *serio, - unsigned char data, unsigned int flags, struct pt_regs *regs) + unsigned char data, unsigned int flags) { struct stinger *stinger = serio_get_drvdata(serio); @@ -109,7 +107,7 @@ static irqreturn_t stinger_interrupt(struct serio *serio, stinger->data[stinger->idx++] = data; if (stinger->idx == 4) { - stinger_process_packet(stinger, regs); + stinger_process_packet(stinger); stinger->idx = 0; } diff --git a/drivers/input/joystick/twidjoy.c b/drivers/input/joystick/twidjoy.c index 076f237d965..49085df2d63 100644 --- a/drivers/input/joystick/twidjoy.c +++ b/drivers/input/joystick/twidjoy.c @@ -104,7 +104,7 @@ struct twidjoy { * Twiddler. It updates the data accordingly. */ -static void twidjoy_process_packet(struct twidjoy *twidjoy, struct pt_regs *regs) +static void twidjoy_process_packet(struct twidjoy *twidjoy) { struct input_dev *dev = twidjoy->dev; unsigned char *data = twidjoy->data; @@ -113,8 +113,6 @@ static void twidjoy_process_packet(struct twidjoy *twidjoy, struct pt_regs *regs button_bits = ((data[1] & 0x7f) << 7) | (data[0] & 0x7f); - input_regs(dev, regs); - for (bp = twidjoy_buttons; bp->bitmask; bp++) { int value = (button_bits & (bp->bitmask << bp->bitshift)) >> bp->bitshift; int i; @@ -141,7 +139,7 @@ static void twidjoy_process_packet(struct twidjoy *twidjoy, struct pt_regs *regs * packet processing routine. */ -static irqreturn_t twidjoy_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) +static irqreturn_t twidjoy_interrupt(struct serio *serio, unsigned char data, unsigned int flags) { struct twidjoy *twidjoy = serio_get_drvdata(serio); @@ -158,7 +156,7 @@ static irqreturn_t twidjoy_interrupt(struct serio *serio, unsigned char data, un twidjoy->data[twidjoy->idx++] = data; if (twidjoy->idx == TWIDJOY_MAX_LENGTH) { - twidjoy_process_packet(twidjoy, regs); + twidjoy_process_packet(twidjoy); twidjoy->idx = 0; } diff --git a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c index f9c1a03214e..35edea1ab95 100644 --- a/drivers/input/joystick/warrior.c +++ b/drivers/input/joystick/warrior.c @@ -64,15 +64,13 @@ struct warrior { * Warrior. It updates the data accordingly. */ -static void warrior_process_packet(struct warrior *warrior, struct pt_regs *regs) +static void warrior_process_packet(struct warrior *warrior) { struct input_dev *dev = warrior->dev; unsigned char *data = warrior->data; if (!warrior->idx) return; - input_regs(dev, regs); - switch ((data[0] >> 4) & 7) { case 1: /* Button data */ input_report_key(dev, BTN_TRIGGER, data[3] & 1); @@ -101,12 +99,12 @@ static void warrior_process_packet(struct warrior *warrior, struct pt_regs *regs */ static irqreturn_t warrior_interrupt(struct serio *serio, - unsigned char data, unsigned int flags, struct pt_regs *regs) + unsigned char data, unsigned int flags) { struct warrior *warrior = serio_get_drvdata(serio); if (data & 0x80) { - if (warrior->idx) warrior_process_packet(warrior, regs); + if (warrior->idx) warrior_process_packet(warrior); warrior->idx = 0; warrior->len = warrior_lengths[(data >> 4) & 7]; } @@ -115,7 +113,7 @@ static irqreturn_t warrior_interrupt(struct serio *serio, warrior->data[warrior->idx++] = data; if (warrior->idx == warrior->len) { - if (warrior->idx) warrior_process_packet(warrior, regs); + if (warrior->idx) warrior_process_packet(warrior); warrior->idx = 0; warrior->len = 0; } |