Commit 15e541fe authored by Jeff Garzik's avatar Jeff Garzik Committed by Linus Torvalds

[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: default avatarJeff Garzik <jeff@garzik.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3c693024
...@@ -1154,13 +1154,10 @@ dumpbufs(skb->data,skb->len,'>'); ...@@ -1154,13 +1154,10 @@ dumpbufs(skb->data,skb->len,'>');
static irqreturn_t static irqreturn_t
toshoboe_interrupt (int irq, void *dev_id) toshoboe_interrupt (int irq, void *dev_id)
{ {
struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id; struct toshoboe_cb *self = dev_id;
__u8 irqstat; __u8 irqstat;
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
if (self == NULL && toshoboe_invalid_dev(irq))
return IRQ_NONE;
irqstat = INB (OBOE_ISR); irqstat = INB (OBOE_ISR);
/* was it us */ /* was it us */
...@@ -1348,13 +1345,11 @@ toshoboe_net_open (struct net_device *dev) ...@@ -1348,13 +1345,11 @@ toshoboe_net_open (struct net_device *dev)
{ {
struct toshoboe_cb *self; struct toshoboe_cb *self;
unsigned long flags; unsigned long flags;
int rc;
IRDA_DEBUG (4, "%s()\n", __FUNCTION__); IRDA_DEBUG (4, "%s()\n", __FUNCTION__);
IRDA_ASSERT (dev != NULL, return -1; ); self = netdev_priv(dev);
self = (struct toshoboe_cb *) dev->priv;
IRDA_ASSERT (self != NULL, return 0; );
if (self->async) if (self->async)
return -EBUSY; return -EBUSY;
...@@ -1362,11 +1357,10 @@ toshoboe_net_open (struct net_device *dev) ...@@ -1362,11 +1357,10 @@ toshoboe_net_open (struct net_device *dev)
if (self->stopped) if (self->stopped)
return 0; return 0;
if (request_irq (self->io.irq, toshoboe_interrupt, rc = request_irq (self->io.irq, toshoboe_interrupt,
IRQF_SHARED | IRQF_DISABLED, dev->name, (void *) self)) IRQF_SHARED | IRQF_DISABLED, dev->name, self);
{ if (rc)
return -EAGAIN; return rc;
}
spin_lock_irqsave(&self->spinlock, flags); spin_lock_irqsave(&self->spinlock, flags);
toshoboe_startchip (self); toshoboe_startchip (self);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment