summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl3501_cs.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-10-06 14:56:04 -0400
committerJeff Garzik <jeff@garzik.org>2006-10-06 14:56:04 -0400
commitc31f28e778ab299a5035ea2bda64f245b8915d7c (patch)
tree92d1070b0ae0c3528ab2c8787c4402fd8adf5a5f /drivers/net/wireless/wl3501_cs.c
parent86d91bab4806191a8126502d80d729c2a4765ebe (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/wireless/wl3501_cs.c')
-rw-r--r--drivers/net/wireless/wl3501_cs.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index a1430352169b..5b98a7876982 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -1155,25 +1155,18 @@ static inline void wl3501_ack_interrupt(struct wl3501_card *this)
*/
static irqreturn_t wl3501_interrupt(int irq, void *dev_id)
{
- struct net_device *dev = (struct net_device *)dev_id;
+ struct net_device *dev = dev_id;
struct wl3501_card *this;
- int handled = 1;
- if (!dev)
- goto unknown;
- this = dev->priv;
+ this = netdev_priv(dev);
spin_lock(&this->lock);
wl3501_ack_interrupt(this);
wl3501_block_interrupt(this);
wl3501_rx_interrupt(dev);
wl3501_unblock_interrupt(this);
spin_unlock(&this->lock);
-out:
- return IRQ_RETVAL(handled);
-unknown:
- handled = 0;
- printk(KERN_ERR "%s: irq %d for unknown device.\n", __FUNCTION__, irq);
- goto out;
+
+ return IRQ_HANDLED;
}
static int wl3501_reset_board(struct wl3501_card *this)