diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-23 18:57:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-23 18:57:39 -0700 |
commit | 25c263542ddf9396012b6a6fa2b327d304f7f9a3 (patch) | |
tree | d7258f81da125b0bf4a2ce0ede2e79db38a7ed04 /drivers/char/riscom8.c | |
parent | d8581969904b8a72db726c4b9090234c0f0bb18f (diff) | |
parent | 7c2399756ab8ccb2c57da4630b4aa4a1d61b3846 (diff) |
Merge branch 'irq-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'irq-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
[SPARC, XEN, NET/CXGB3] use irq_handler_t where appropriate
drivers/char/riscom8: clean up irq handling
isdn/sc: irq handler clean
isdn/act2000: fix major bug. clean irq handler.
char/pcmcia/synclink_cs: trim trailing whitespace
drivers/char/ip2: separate polling and irq-driven work entry points
drivers/char/ip2: split out irq core logic into separate function
[NETDRVR] lib82596, netxen: delete pointless tests from irq handler
Eliminate pointless casts from void* in a few driver irq handlers.
[PARPORT] Remove unused 'irq' argument from parport irq functions
[PARPORT] Kill useful 'irq' arg from parport_{generic_irq,ieee1284_interrupt}
[PARPORT] Consolidate code copies into a single generic irq handler
Diffstat (limited to 'drivers/char/riscom8.c')
-rw-r--r-- | drivers/char/riscom8.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index b37e626f4fa..102ece4c4e0 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c @@ -79,7 +79,6 @@ #define RS_EVENT_WRITE_WAKEUP 0 -static struct riscom_board * IRQ_to_board[16]; static struct tty_driver *riscom_driver; static struct riscom_board rc_board[RC_NBOARD] = { @@ -537,16 +536,14 @@ static inline void rc_check_modem(struct riscom_board const * bp) } /* The main interrupt processing routine */ -static irqreturn_t rc_interrupt(int irq, void * dev_id) +static irqreturn_t rc_interrupt(int dummy, void * dev_id) { unsigned char status; unsigned char ack; - struct riscom_board *bp; + struct riscom_board *bp = dev_id; unsigned long loop = 0; int handled = 0; - bp = IRQ_to_board[irq]; - if (!(bp->flags & RC_BOARD_ACTIVE)) return IRQ_NONE; @@ -603,7 +600,7 @@ static irqreturn_t rc_interrupt(int irq, void * dev_id) */ /* Called with disabled interrupts */ -static inline int rc_setup_board(struct riscom_board * bp) +static int rc_setup_board(struct riscom_board * bp) { int error; @@ -611,7 +608,7 @@ static inline int rc_setup_board(struct riscom_board * bp) return 0; error = request_irq(bp->irq, rc_interrupt, IRQF_DISABLED, - "RISCom/8", NULL); + "RISCom/8", bp); if (error) return error; @@ -619,14 +616,13 @@ static inline int rc_setup_board(struct riscom_board * bp) bp->DTR = ~0; rc_out(bp, RC_DTR, bp->DTR); /* Drop DTR on all ports */ - IRQ_to_board[bp->irq] = bp; bp->flags |= RC_BOARD_ACTIVE; return 0; } /* Called with disabled interrupts */ -static inline void rc_shutdown_board(struct riscom_board *bp) +static void rc_shutdown_board(struct riscom_board *bp) { if (!(bp->flags & RC_BOARD_ACTIVE)) return; @@ -634,7 +630,6 @@ static inline void rc_shutdown_board(struct riscom_board *bp) bp->flags &= ~RC_BOARD_ACTIVE; free_irq(bp->irq, NULL); - IRQ_to_board[bp->irq] = NULL; bp->DTR = ~0; rc_out(bp, RC_DTR, bp->DTR); /* Drop DTR on all ports */ @@ -1594,7 +1589,6 @@ static inline int rc_init_drivers(void) if (!riscom_driver) return -ENOMEM; - memset(IRQ_to_board, 0, sizeof(IRQ_to_board)); riscom_driver->owner = THIS_MODULE; riscom_driver->name = "ttyL"; riscom_driver->major = RISCOM8_NORMAL_MAJOR; |