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/irda/smsc-ircc2.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'drivers/net/irda/smsc-ircc2.c') diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index 7e7b5828214..1f26da761e9 100644 --- a/drivers/net/irda/smsc-ircc2.c +++ b/drivers/net/irda/smsc-ircc2.c @@ -1505,22 +1505,13 @@ static void smsc_ircc_sir_receive(struct smsc_ircc_cb *self) * An interrupt from the chip has arrived. Time to do some work * */ -static irqreturn_t smsc_ircc_interrupt(int irq, void *dev_id) +static irqreturn_t smsc_ircc_interrupt(int dummy, void *dev_id) { - struct net_device *dev = (struct net_device *) dev_id; - struct smsc_ircc_cb *self; + struct net_device *dev = dev_id; + struct smsc_ircc_cb *self = netdev_priv(dev); int iobase, iir, lcra, lsr; irqreturn_t ret = IRQ_NONE; - if (dev == NULL) { - printk(KERN_WARNING "%s: irq %d for unknown device.\n", - driver_name, irq); - goto irq_ret; - } - - self = netdev_priv(dev); - IRDA_ASSERT(self != NULL, return IRQ_NONE;); - /* Serialise the interrupt handler in various CPUs, stop Tx path */ spin_lock(&self->lock); @@ -1565,7 +1556,7 @@ static irqreturn_t smsc_ircc_interrupt(int irq, void *dev_id) irq_ret_unlock: spin_unlock(&self->lock); - irq_ret: + return ret; } -- cgit v1.2.3-18-g5258