Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] irda: donauboe fixes, cleanups

- fix: toshoboe_invalid_dev() was recently removed, but not all callers
were updated, causing the obvious linker error. Remove caller,
because the check (like the one removed) isn't used.

- fix: propagate request_irq() return value

- cleanup: remove void* casts

- cleanup: remove impossible ASSERTs

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Jeff Garzik and committed by
Linus Torvalds
15e541fe 3c693024

+7 -13
+7 -13
drivers/net/irda/donauboe.c
··· 1154 1154 static irqreturn_t 1155 1155 toshoboe_interrupt (int irq, void *dev_id) 1156 1156 { 1157 - struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id; 1157 + struct toshoboe_cb *self = dev_id; 1158 1158 __u8 irqstat; 1159 1159 struct sk_buff *skb = NULL; 1160 - 1161 - if (self == NULL && toshoboe_invalid_dev(irq)) 1162 - return IRQ_NONE; 1163 1160 1164 1161 irqstat = INB (OBOE_ISR); 1165 1162 ··· 1345 1348 { 1346 1349 struct toshoboe_cb *self; 1347 1350 unsigned long flags; 1351 + int rc; 1348 1352 1349 1353 IRDA_DEBUG (4, "%s()\n", __FUNCTION__); 1350 1354 1351 - IRDA_ASSERT (dev != NULL, return -1; ); 1352 - self = (struct toshoboe_cb *) dev->priv; 1353 - 1354 - IRDA_ASSERT (self != NULL, return 0; ); 1355 + self = netdev_priv(dev); 1355 1356 1356 1357 if (self->async) 1357 1358 return -EBUSY; ··· 1357 1362 if (self->stopped) 1358 1363 return 0; 1359 1364 1360 - if (request_irq (self->io.irq, toshoboe_interrupt, 1361 - IRQF_SHARED | IRQF_DISABLED, dev->name, (void *) self)) 1362 - { 1363 - return -EAGAIN; 1364 - } 1365 + rc = request_irq (self->io.irq, toshoboe_interrupt, 1366 + IRQF_SHARED | IRQF_DISABLED, dev->name, self); 1367 + if (rc) 1368 + return rc; 1365 1369 1366 1370 spin_lock_irqsave(&self->spinlock, flags); 1367 1371 toshoboe_startchip (self);