aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/spectrum_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/spectrum_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/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 e9172eebfd01..7f9aa139c347 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)
866{ 866{
867 struct net_device *dev = link->priv; 867 struct net_device *dev = link->priv;
868 struct orinoco_private *priv = netdev_priv(dev); 868 struct orinoco_private *priv = netdev_priv(dev);
869 unsigned long flags;
870 int err = 0; 869 int err = 0;
871 870
872 /* Mark the device as stopped, to block IO until later */ 871 /* Mark the device as stopped, to block IO until later */
873 spin_lock_irqsave(&priv->lock, flags); 872 spin_lock(&priv->lock);
874 873
875 err = __orinoco_down(dev); 874 err = __orinoco_down(dev);
876 if (err) 875 if (err)
@@ -880,9 +879,9 @@ spectrum_cs_suspend(struct pcmcia_device *link)
880 netif_device_detach(dev); 879 netif_device_detach(dev);
881 priv->hw_unavailable++; 880 priv->hw_unavailable++;
882 881
883 spin_unlock_irqrestore(&priv->lock, flags); 882 spin_unlock(&priv->lock);
884 883
885 return 0; 884 return err;
886} 885}
887 886
888static int 887static int