Skip to content

Commit 15e541f

Browse files
Jeff GarzikLinus Torvalds
authored andcommitted
[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>
1 parent 3c69302 commit 15e541f

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

‎drivers/net/irda/donauboe.c‎

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,13 +1154,10 @@ dumpbufs(skb->data,skb->len,'>');
11541154
static irqreturn_t
11551155
toshoboe_interrupt (int irq, void *dev_id)
11561156
{
1157-
struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id;
1157+
struct toshoboe_cb *self = dev_id;
11581158
__u8 irqstat;
11591159
struct sk_buff *skb = NULL;
11601160

1161-
if (self == NULL && toshoboe_invalid_dev(irq))
1162-
return IRQ_NONE;
1163-
11641161
irqstat = INB (OBOE_ISR);
11651162

11661163
/* was it us */
@@ -1348,25 +1345,22 @@ toshoboe_net_open (struct net_device *dev)
13481345
{
13491346
struct toshoboe_cb *self;
13501347
unsigned long flags;
1348+
int rc;
13511349

13521350
IRDA_DEBUG (4, "%s()\n", __FUNCTION__);
13531351

1354-
IRDA_ASSERT (dev != NULL, return -1; );
1355-
self = (struct toshoboe_cb *) dev->priv;
1356-
1357-
IRDA_ASSERT (self != NULL, return 0; );
1352+
self = netdev_priv(dev);
13581353

13591354
if (self->async)
13601355
return -EBUSY;
13611356

13621357
if (self->stopped)
13631358
return 0;
13641359

1365-
if (request_irq (self->io.irq, toshoboe_interrupt,
1366-
IRQF_SHARED | IRQF_DISABLED, dev->name, (void *) self))
1367-
{
1368-
return -EAGAIN;
1369-
}
1360+
rc = request_irq (self->io.irq, toshoboe_interrupt,
1361+
IRQF_SHARED | IRQF_DISABLED, dev->name, self);
1362+
if (rc)
1363+
return rc;
13701364

13711365
spin_lock_irqsave(&self->spinlock, flags);
13721366
toshoboe_startchip (self);

0 commit comments

Comments
 (0)