summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/spectrum_cs.c
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2006-05-01 06:13:28 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2006-05-05 21:10:40 (GMT)
commit6cbaa330f1022abfc7419aaa11ee1a9291f0beb0 (patch)
treeda9de71c1eef54be38880ef5ddc63e5622cae516 /drivers/net/wireless/spectrum_cs.c
parent9a568da2097ad3701ca575cb6d360d56ffeee446 (diff)
downloadlinux-6cbaa330f1022abfc7419aaa11ee1a9291f0beb0.tar.xz
[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/spectrum_cs.c')
-rw-r--r--drivers/net/wireless/spectrum_cs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c
index e9172ee..7f9aa13 100644
--- a/drivers/net/wireless/spectrum_cs.c
+++ b/drivers/net/wireless/spectrum_cs.c
@@ -866,11 +866,10 @@ spectrum_cs_suspend(struct pcmcia_device *link)
{
struct net_device *dev = link->priv;
struct orinoco_private *priv = netdev_priv(dev);
- unsigned long flags;
int err = 0;
/* Mark the device as stopped, to block IO until later */
- spin_lock_irqsave(&priv->lock, flags);
+ spin_lock(&priv->lock);
err = __orinoco_down(dev);
if (err)
@@ -880,9 +879,9 @@ spectrum_cs_suspend(struct pcmcia_device *link)
netif_device_detach(dev);
priv->hw_unavailable++;
- spin_unlock_irqrestore(&priv->lock, flags);
+ spin_unlock(&priv->lock);
- return 0;
+ return err;
}
static int