diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-10-29 05:46:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:03:40 -0500 |
commit | 28fc1f5a0c375cb6375fa48e9a8b393f2a189be6 (patch) | |
tree | 95b3b517b02dd46ff0fc2728c1e70de8d6f78ed3 /drivers/net/wan | |
parent | 1b36efe07f83ecf50eddd431d067c7bf86318e87 (diff) |
[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 <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/farsync.c | 11 | ||||
-rw-r--r-- | drivers/net/wan/sdla.c | 5 |
2 files changed, 6 insertions, 10 deletions
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) | |||
1498 | * Dev_id is our fst_card_info pointer | 1498 | * Dev_id is our fst_card_info pointer |
1499 | */ | 1499 | */ |
1500 | static irqreturn_t | 1500 | static irqreturn_t |
1501 | fst_intr(int irq, void *dev_id) | 1501 | fst_intr(int dummy, void *dev_id) |
1502 | { | 1502 | { |
1503 | struct fst_card_info *card; | 1503 | struct fst_card_info *card = dev_id; |
1504 | struct fst_port_info *port; | 1504 | struct fst_port_info *port; |
1505 | int rdidx; /* Event buffer indices */ | 1505 | int rdidx; /* Event buffer indices */ |
1506 | int wridx; | 1506 | int wridx; |
@@ -1509,17 +1509,12 @@ fst_intr(int irq, void *dev_id) | |||
1509 | unsigned int do_card_interrupt; | 1509 | unsigned int do_card_interrupt; |
1510 | unsigned int int_retry_count; | 1510 | unsigned int int_retry_count; |
1511 | 1511 | ||
1512 | if ((card = dev_id) == NULL) { | ||
1513 | dbg(DBG_INTR, "intr: spurious %d\n", irq); | ||
1514 | return IRQ_NONE; | ||
1515 | } | ||
1516 | |||
1517 | /* | 1512 | /* |
1518 | * Check to see if the interrupt was for this card | 1513 | * Check to see if the interrupt was for this card |
1519 | * return if not | 1514 | * return if not |
1520 | * Note that the call to clear the interrupt is important | 1515 | * Note that the call to clear the interrupt is important |
1521 | */ | 1516 | */ |
1522 | dbg(DBG_INTR, "intr: %d %p\n", irq, card); | 1517 | dbg(DBG_INTR, "intr: %d %p\n", card->irq, card); |
1523 | if (card->state != FST_RUNNING) { | 1518 | if (card->state != FST_RUNNING) { |
1524 | printk_err | 1519 | printk_err |
1525 | ("Interrupt received for card %d in a non running state (%d)\n", | 1520 | ("Interrupt received for card %d in a non running state (%d)\n", |
diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c index 05df0a345b60..73e2f2780932 100644 --- a/drivers/net/wan/sdla.c +++ b/drivers/net/wan/sdla.c | |||
@@ -867,7 +867,7 @@ static void sdla_receive(struct net_device *dev) | |||
867 | spin_unlock_irqrestore(&sdla_lock, flags); | 867 | spin_unlock_irqrestore(&sdla_lock, flags); |
868 | } | 868 | } |
869 | 869 | ||
870 | static irqreturn_t sdla_isr(int irq, void *dev_id) | 870 | static irqreturn_t sdla_isr(int dummy, void *dev_id) |
871 | { | 871 | { |
872 | struct net_device *dev; | 872 | struct net_device *dev; |
873 | struct frad_local *flp; | 873 | struct frad_local *flp; |
@@ -879,7 +879,8 @@ static irqreturn_t sdla_isr(int irq, void *dev_id) | |||
879 | 879 | ||
880 | if (!flp->initialized) | 880 | if (!flp->initialized) |
881 | { | 881 | { |
882 | printk(KERN_WARNING "%s: irq %d for uninitialized device.\n", dev->name, irq); | 882 | printk(KERN_WARNING "%s: irq %d for uninitialized device.\n", |
883 | dev->name, dev->irq); | ||
883 | return IRQ_NONE; | 884 | return IRQ_NONE; |
884 | } | 885 | } |
885 | 886 | ||