diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-10-06 14:56:04 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-10-06 14:56:04 -0400 |
commit | c31f28e778ab299a5035ea2bda64f245b8915d7c (patch) | |
tree | 92d1070b0ae0c3528ab2c8787c4402fd8adf5a5f /drivers/net/3c523.c | |
parent | 86d91bab4806191a8126502d80d729c2a4765ebe (diff) |
drivers/net: eliminate irq handler impossible checks, needless casts
- Eliminate check for irq handler 'dev_id==NULL' where the
condition never occurs.
- Eliminate needless casts to/from void*
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/3c523.c')
-rw-r--r-- | drivers/net/3c523.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c index 1c97271112d0..91849469b4f4 100644 --- a/drivers/net/3c523.c +++ b/drivers/net/3c523.c | |||
@@ -902,14 +902,11 @@ static void *alloc_rfa(struct net_device *dev, void *ptr) | |||
902 | static irqreturn_t | 902 | static irqreturn_t |
903 | elmc_interrupt(int irq, void *dev_id) | 903 | elmc_interrupt(int irq, void *dev_id) |
904 | { | 904 | { |
905 | struct net_device *dev = (struct net_device *) dev_id; | 905 | struct net_device *dev = dev_id; |
906 | unsigned short stat; | 906 | unsigned short stat; |
907 | struct priv *p; | 907 | struct priv *p; |
908 | 908 | ||
909 | if (dev == NULL) { | 909 | if (!netif_running(dev)) { |
910 | printk(KERN_ERR "elmc-interrupt: irq %d for unknown device.\n", irq); | ||
911 | return IRQ_NONE; | ||
912 | } else if (!netif_running(dev)) { | ||
913 | /* The 3c523 has this habit of generating interrupts during the | 910 | /* The 3c523 has this habit of generating interrupts during the |
914 | reset. I'm not sure if the ni52 has this same problem, but it's | 911 | reset. I'm not sure if the ni52 has this same problem, but it's |
915 | really annoying if we haven't finished initializing it. I was | 912 | really annoying if we haven't finished initializing it. I was |