diff options
Diffstat (limited to 'drivers/net/irda/donauboe.c')
-rw-r--r-- | drivers/net/irda/donauboe.c | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c index 33c07d5275da..16620bd97fbf 100644 --- a/drivers/net/irda/donauboe.c +++ b/drivers/net/irda/donauboe.c | |||
@@ -657,12 +657,6 @@ toshoboe_makemttpacket (struct toshoboe_cb *self, void *buf, int mtt) | |||
657 | return xbofs; | 657 | return xbofs; |
658 | } | 658 | } |
659 | 659 | ||
660 | static int toshoboe_invalid_dev(int irq) | ||
661 | { | ||
662 | printk (KERN_WARNING DRIVER_NAME ": irq %d for unknown device.\n", irq); | ||
663 | return 1; | ||
664 | } | ||
665 | |||
666 | #ifdef USE_PROBE | 660 | #ifdef USE_PROBE |
667 | /***********************************************************************/ | 661 | /***********************************************************************/ |
668 | /* Probe code */ | 662 | /* Probe code */ |
@@ -709,14 +703,11 @@ stuff_byte (__u8 byte, __u8 * buf) | |||
709 | } | 703 | } |
710 | 704 | ||
711 | static irqreturn_t | 705 | static irqreturn_t |
712 | toshoboe_probeinterrupt (int irq, void *dev_id, struct pt_regs *regs) | 706 | toshoboe_probeinterrupt (int irq, void *dev_id) |
713 | { | 707 | { |
714 | struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id; | 708 | struct toshoboe_cb *self = dev_id; |
715 | __u8 irqstat; | 709 | __u8 irqstat; |
716 | 710 | ||
717 | if (self == NULL && toshoboe_invalid_dev(irq)) | ||
718 | return IRQ_NONE; | ||
719 | |||
720 | irqstat = INB (OBOE_ISR); | 711 | irqstat = INB (OBOE_ISR); |
721 | 712 | ||
722 | /* was it us */ | 713 | /* was it us */ |
@@ -1161,15 +1152,12 @@ dumpbufs(skb->data,skb->len,'>'); | |||
1161 | 1152 | ||
1162 | /*interrupt handler */ | 1153 | /*interrupt handler */ |
1163 | static irqreturn_t | 1154 | static irqreturn_t |
1164 | toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs) | 1155 | toshoboe_interrupt (int irq, void *dev_id) |
1165 | { | 1156 | { |
1166 | struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id; | 1157 | struct toshoboe_cb *self = dev_id; |
1167 | __u8 irqstat; | 1158 | __u8 irqstat; |
1168 | struct sk_buff *skb = NULL; | 1159 | struct sk_buff *skb = NULL; |
1169 | 1160 | ||
1170 | if (self == NULL && toshoboe_invalid_dev(irq)) | ||
1171 | return IRQ_NONE; | ||
1172 | |||
1173 | irqstat = INB (OBOE_ISR); | 1161 | irqstat = INB (OBOE_ISR); |
1174 | 1162 | ||
1175 | /* was it us */ | 1163 | /* was it us */ |
@@ -1357,13 +1345,11 @@ toshoboe_net_open (struct net_device *dev) | |||
1357 | { | 1345 | { |
1358 | struct toshoboe_cb *self; | 1346 | struct toshoboe_cb *self; |
1359 | unsigned long flags; | 1347 | unsigned long flags; |
1348 | int rc; | ||
1360 | 1349 | ||
1361 | IRDA_DEBUG (4, "%s()\n", __FUNCTION__); | 1350 | IRDA_DEBUG (4, "%s()\n", __FUNCTION__); |
1362 | 1351 | ||
1363 | IRDA_ASSERT (dev != NULL, return -1; ); | 1352 | self = netdev_priv(dev); |
1364 | self = (struct toshoboe_cb *) dev->priv; | ||
1365 | |||
1366 | IRDA_ASSERT (self != NULL, return 0; ); | ||
1367 | 1353 | ||
1368 | if (self->async) | 1354 | if (self->async) |
1369 | return -EBUSY; | 1355 | return -EBUSY; |
@@ -1371,11 +1357,10 @@ toshoboe_net_open (struct net_device *dev) | |||
1371 | if (self->stopped) | 1357 | if (self->stopped) |
1372 | return 0; | 1358 | return 0; |
1373 | 1359 | ||
1374 | if (request_irq (self->io.irq, toshoboe_interrupt, | 1360 | rc = request_irq (self->io.irq, toshoboe_interrupt, |
1375 | IRQF_SHARED | IRQF_DISABLED, dev->name, (void *) self)) | 1361 | IRQF_SHARED | IRQF_DISABLED, dev->name, self); |
1376 | { | 1362 | if (rc) |
1377 | return -EAGAIN; | 1363 | return rc; |
1378 | } | ||
1379 | 1364 | ||
1380 | spin_lock_irqsave(&self->spinlock, flags); | 1365 | spin_lock_irqsave(&self->spinlock, flags); |
1381 | toshoboe_startchip (self); | 1366 | toshoboe_startchip (self); |