mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 06:37:59 +00:00
orinoco: fix unsafe locking in spectrum_cs_suspend
A similar problem was highlighted in the orinoco_cs driver by lockdep. This patch fixes the spectrum_cs driver. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
552a71515e
commit
c25bab54fe
1 changed files with 3 additions and 2 deletions
|
@ -450,10 +450,11 @@ spectrum_cs_suspend(struct pcmcia_device *link)
|
||||||
{
|
{
|
||||||
struct net_device *dev = link->priv;
|
struct net_device *dev = link->priv;
|
||||||
struct orinoco_private *priv = netdev_priv(dev);
|
struct orinoco_private *priv = netdev_priv(dev);
|
||||||
|
unsigned long flags;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
/* Mark the device as stopped, to block IO until later */
|
/* Mark the device as stopped, to block IO until later */
|
||||||
spin_lock(&priv->lock);
|
spin_lock_irqsave(&priv->lock, flags);
|
||||||
|
|
||||||
err = __orinoco_down(dev);
|
err = __orinoco_down(dev);
|
||||||
if (err)
|
if (err)
|
||||||
|
@ -463,7 +464,7 @@ spectrum_cs_suspend(struct pcmcia_device *link)
|
||||||
netif_device_detach(dev);
|
netif_device_detach(dev);
|
||||||
priv->hw_unavailable++;
|
priv->hw_unavailable++;
|
||||||
|
|
||||||
spin_unlock(&priv->lock);
|
spin_unlock_irqrestore(&priv->lock, flags);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue