Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74885
b: refs/heads/master
c: 497ba7f
h: refs/heads/master
i:
  74883: fba7208
v: v3
  • Loading branch information
Oliver Neukum authored and David S. Miller committed Dec 16, 2007
1 parent d55e74c commit c3d27fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef5d4cf2f9aae4e09883d2d664e367a16b47d857
refs/heads/master: 497ba7f4c8113ed699a4fd793d1437f0c8f2da5e
5 changes: 5 additions & 0 deletions trunk/drivers/net/irda/irda-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,7 @@ static int stir421x_patch_device(struct irda_usb_cb *self)
static int irda_usb_net_open(struct net_device *netdev)
{
struct irda_usb_cb *self;
unsigned long flags;
char hwname[16];
int i;

Expand All @@ -1177,13 +1178,16 @@ static int irda_usb_net_open(struct net_device *netdev)
self = (struct irda_usb_cb *) netdev->priv;
IRDA_ASSERT(self != NULL, return -1;);

spin_lock_irqsave(&self->lock, flags);
/* Can only open the device if it's there */
if(!self->present) {
spin_unlock_irqrestore(&self->lock, flags);
IRDA_WARNING("%s(), device not present!\n", __FUNCTION__);
return -1;
}

if(self->needspatch) {
spin_unlock_irqrestore(&self->lock, flags);
IRDA_WARNING("%s(), device needs patch\n", __FUNCTION__) ;
return -EIO ;
}
Expand All @@ -1198,6 +1202,7 @@ static int irda_usb_net_open(struct net_device *netdev)
/* To do *before* submitting Rx urbs and starting net Tx queue
* Jean II */
self->netopen = 1;
spin_unlock_irqrestore(&self->lock, flags);

/*
* Now that everything should be initialized properly,
Expand Down

0 comments on commit c3d27fe

Please sign in to comment.