diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-10-10 01:40:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-10 19:29:37 -0400 |
commit | 15e541feb340bc2a4caaf707ee5ad71a47fdd068 (patch) | |
tree | 89c77fe53af13183b63745667269b748dca628db | |
parent | 3c693024cffa5c96a20b969f4efd058675e7700f (diff) |
[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>
-rw-r--r-- | drivers/net/irda/donauboe.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c index 636d0630fe02..16620bd97fbf 100644 --- a/drivers/net/irda/donauboe.c +++ b/drivers/net/irda/donauboe.c | |||
@@ -1154,13 +1154,10 @@ dumpbufs(skb->data,skb->len,'>'); | |||
1154 | static irqreturn_t | 1154 | static irqreturn_t |
1155 | toshoboe_interrupt (int irq, void *dev_id) | 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 | __u8 irqstat; | 1158 | __u8 irqstat; |
1159 | struct sk_buff *skb = NULL; | 1159 | struct sk_buff *skb = NULL; |
1160 | 1160 | ||
1161 | if (self == NULL && toshoboe_invalid_dev(irq)) | ||
1162 | return IRQ_NONE; | ||
1163 | |||
1164 | irqstat = INB (OBOE_ISR); | 1161 | irqstat = INB (OBOE_ISR); |
1165 | 1162 | ||
1166 | /* was it us */ | 1163 | /* was it us */ |
@@ -1348,13 +1345,11 @@ toshoboe_net_open (struct net_device *dev) | |||
1348 | { | 1345 | { |
1349 | struct toshoboe_cb *self; | 1346 | struct toshoboe_cb *self; |
1350 | unsigned long flags; | 1347 | unsigned long flags; |
1348 | int rc; | ||
1351 | 1349 | ||
1352 | IRDA_DEBUG (4, "%s()\n", __FUNCTION__); | 1350 | IRDA_DEBUG (4, "%s()\n", __FUNCTION__); |
1353 | 1351 | ||
1354 | IRDA_ASSERT (dev != NULL, return -1; ); | 1352 | self = netdev_priv(dev); |
1355 | self = (struct toshoboe_cb *) dev->priv; | ||
1356 | |||
1357 | IRDA_ASSERT (self != NULL, return 0; ); | ||
1358 | 1353 | ||
1359 | if (self->async) | 1354 | if (self->async) |
1360 | return -EBUSY; | 1355 | return -EBUSY; |
@@ -1362,11 +1357,10 @@ toshoboe_net_open (struct net_device *dev) | |||
1362 | if (self->stopped) | 1357 | if (self->stopped) |
1363 | return 0; | 1358 | return 0; |
1364 | 1359 | ||
1365 | if (request_irq (self->io.irq, toshoboe_interrupt, | 1360 | rc = request_irq (self->io.irq, toshoboe_interrupt, |
1366 | IRQF_SHARED | IRQF_DISABLED, dev->name, (void *) self)) | 1361 | IRQF_SHARED | IRQF_DISABLED, dev->name, self); |
1367 | { | 1362 | if (rc) |
1368 | return -EAGAIN; | 1363 | return rc; |
1369 | } | ||
1370 | 1364 | ||
1371 | spin_lock_irqsave(&self->spinlock, flags); | 1365 | spin_lock_irqsave(&self->spinlock, flags); |
1372 | toshoboe_startchip (self); | 1366 | toshoboe_startchip (self); |