From 28fc1f5a0c375cb6375fa48e9a8b393f2a189be6 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Mon, 29 Oct 2007 05:46:16 -0400 Subject: [netdrvr] irq handler minor cleanups in several drivers * use irq_handler_t where appropriate * no need to use 'irq' function arg, its already stored in a data struct * rename irq handler 'irq' argument to 'dummy', where the function has been analyzed and proven not to use its first argument. * remove always-false "dev_id == NULL" test from irq handlers * remove pointless casts from void* * declance: irq argument is not const * add KERN_xxx printk prefix * fix minor whitespace weirdness Signed-off-by: Jeff Garzik --- drivers/net/wan/farsync.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'drivers/net/wan/farsync.c') diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index 12dae8e24844..cf27bf40d36e 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c @@ -1498,9 +1498,9 @@ do_bottom_half_rx(struct fst_card_info *card) * Dev_id is our fst_card_info pointer */ static irqreturn_t -fst_intr(int irq, void *dev_id) +fst_intr(int dummy, void *dev_id) { - struct fst_card_info *card; + struct fst_card_info *card = dev_id; struct fst_port_info *port; int rdidx; /* Event buffer indices */ int wridx; @@ -1509,17 +1509,12 @@ fst_intr(int irq, void *dev_id) unsigned int do_card_interrupt; unsigned int int_retry_count; - if ((card = dev_id) == NULL) { - dbg(DBG_INTR, "intr: spurious %d\n", irq); - return IRQ_NONE; - } - /* * Check to see if the interrupt was for this card * return if not * Note that the call to clear the interrupt is important */ - dbg(DBG_INTR, "intr: %d %p\n", irq, card); + dbg(DBG_INTR, "intr: %d %p\n", card->irq, card); if (card->state != FST_RUNNING) { printk_err ("Interrupt received for card %d in a non running state (%d)\n", -- cgit v1.2.3