From c31f28e778ab299a5035ea2bda64f245b8915d7c Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Fri, 6 Oct 2006 14:56:04 -0400 Subject: 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 --- drivers/net/irda/ali-ircc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'drivers/net/irda/ali-ircc.c') diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c index 971e2dee1e6b..cebf8c374bc5 100644 --- a/drivers/net/irda/ali-ircc.c +++ b/drivers/net/irda/ali-ircc.c @@ -662,19 +662,13 @@ static int ali_ircc_read_dongle_id (int i, chipio_t *info) */ static irqreturn_t ali_ircc_interrupt(int irq, void *dev_id) { - struct net_device *dev = (struct net_device *) dev_id; + struct net_device *dev = dev_id; struct ali_ircc_cb *self; int ret; IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); - if (!dev) { - IRDA_WARNING("%s: irq %d for unknown device.\n", - ALI_IRCC_DRIVER_NAME, irq); - return IRQ_NONE; - } - - self = (struct ali_ircc_cb *) dev->priv; + self = dev->priv; spin_lock(&self->lock); -- cgit v1.2.2