aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco_cs.c
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2006-05-01 02:13:28 -0400
committerJohn W. Linville <linville@tuxdriver.com>2006-05-05 17:10:40 -0400
commit6cbaa330f1022abfc7419aaa11ee1a9291f0beb0 (patch)
treeda9de71c1eef54be38880ef5ddc63e5622cae516 /drivers/net/wireless/orinoco_cs.c
parent9a568da2097ad3701ca575cb6d360d56ffeee446 (diff)
[PATCH] orinoco: simplify locking, fix error handling in PCMCIA resume
Don't use flags in the spinlocks - the PCMCIA resume functions may not be called under lock. Don't ignore any errors. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco_cs.c')
-rw-r--r--drivers/net/wireless/orinoco_cs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c
index 1c19c76d47af..b2aec4d9fbb1 100644
--- a/drivers/net/wireless/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco_cs.c
@@ -415,7 +415,6 @@ static int orinoco_cs_resume(struct pcmcia_device *link)
415 struct orinoco_private *priv = netdev_priv(dev); 415 struct orinoco_private *priv = netdev_priv(dev);
416 struct orinoco_pccard *card = priv->card; 416 struct orinoco_pccard *card = priv->card;
417 int err = 0; 417 int err = 0;
418 unsigned long flags;
419 418
420 if (! test_bit(0, &card->hard_reset_in_progress)) { 419 if (! test_bit(0, &card->hard_reset_in_progress)) {
421 err = orinoco_reinit_firmware(dev); 420 err = orinoco_reinit_firmware(dev);
@@ -425,7 +424,7 @@ static int orinoco_cs_resume(struct pcmcia_device *link)
425 return -EIO; 424 return -EIO;
426 } 425 }
427 426
428 spin_lock_irqsave(&priv->lock, flags); 427 spin_lock(&priv->lock);
429 428
430 netif_device_attach(dev); 429 netif_device_attach(dev);
431 priv->hw_unavailable--; 430 priv->hw_unavailable--;
@@ -437,10 +436,10 @@ static int orinoco_cs_resume(struct pcmcia_device *link)
437 dev->name, err); 436 dev->name, err);
438 } 437 }
439 438
440 spin_unlock_irqrestore(&priv->lock, flags); 439 spin_unlock(&priv->lock);
441 } 440 }
442 441
443 return 0; 442 return err;
444} 443}
445 444
446 445