diff options
author | David Kilroy <kilroyd@googlemail.com> | 2010-05-01 09:05:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-03 14:53:07 -0400 |
commit | bcad6e80f3fb0d6724c3814cf32258bbcf1d67db (patch) | |
tree | 13fc2edae79405b7ae393099486153eefa3091d1 /drivers/net/wireless/orinoco/spectrum_cs.c | |
parent | 593ef09c9e70c92c0d76c67a1c03a5d44d3aec82 (diff) |
orinoco: encapsulate driver locking
Local bus and USB drivers will need to do locking differently.
The original orinoco_usb patches had a boolean variable controlling
whether spin_lock_bh was used, or irq based locking. This version
provides wrappers for the lock functions and the drivers specify the
functions pointers needed.
This will introduce a performance penalty, but I'm not expecting it to
be noticable.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco/spectrum_cs.c')
-rw-r--r-- | drivers/net/wireless/orinoco/spectrum_cs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c index 77b58717d185..b4f68ef771e4 100644 --- a/drivers/net/wireless/orinoco/spectrum_cs.c +++ b/drivers/net/wireless/orinoco/spectrum_cs.c | |||
@@ -405,9 +405,9 @@ spectrum_cs_release(struct pcmcia_device *link) | |||
405 | 405 | ||
406 | /* We're committed to taking the device away now, so mark the | 406 | /* We're committed to taking the device away now, so mark the |
407 | * hardware as unavailable */ | 407 | * hardware as unavailable */ |
408 | spin_lock_irqsave(&priv->lock, flags); | 408 | priv->hw.ops->lock_irqsave(&priv->lock, &flags); |
409 | priv->hw_unavailable++; | 409 | priv->hw_unavailable++; |
410 | spin_unlock_irqrestore(&priv->lock, flags); | 410 | priv->hw.ops->unlock_irqrestore(&priv->lock, &flags); |
411 | 411 | ||
412 | pcmcia_disable_device(link); | 412 | pcmcia_disable_device(link); |
413 | if (priv->hw.iobase) | 413 | if (priv->hw.iobase) |