diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-13 01:53:57 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:07:08 -0500 |
commit | f5a3ea6f966700ae82504202fdd827f2d3c79e66 (patch) | |
tree | a7bb9853b28458f6c0dcae6d69128da6b1103012 /drivers/net | |
parent | 860621347e88b23517fc4ec93fa5af940401c3ec (diff) |
libertas: use spin_is_locked() instead of spin_trylock() in lbs_interrupt()
We get scary warnings on UP if we use spin_trylock() and find, as we
hoped, that the lock in question is already locked.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 9232b975a42c..5d2bf539d4b9 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -1414,8 +1414,7 @@ void lbs_interrupt(struct lbs_private *priv) | |||
1414 | 1414 | ||
1415 | lbs_deb_thread("lbs_interrupt: intcounter=%d\n", priv->intcounter); | 1415 | lbs_deb_thread("lbs_interrupt: intcounter=%d\n", priv->intcounter); |
1416 | 1416 | ||
1417 | if (spin_trylock(&priv->driver_lock)) { | 1417 | if (!spin_is_locked(&priv->driver_lock)) { |
1418 | spin_unlock(&priv->driver_lock); | ||
1419 | printk(KERN_CRIT "%s called without driver_lock held\n", __func__); | 1418 | printk(KERN_CRIT "%s called without driver_lock held\n", __func__); |
1420 | WARN_ON(1); | 1419 | WARN_ON(1); |
1421 | } | 1420 | } |