]> err.no Git - linux-2.6/commitdiff
libertas: use spin_is_locked() instead of spin_trylock() in lbs_interrupt()
authorDavid Woodhouse <dwmw2@infradead.org>
Thu, 13 Dec 2007 06:53:57 +0000 (01:53 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:07:08 +0000 (15:07 -0800)
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>
drivers/net/wireless/libertas/main.c

index 9232b975a42c1e28d7d557e9773c32ca101af2b9..5d2bf539d4b92a87a2cdb48321795f37869a1330 100644 (file)
@@ -1414,8 +1414,7 @@ void lbs_interrupt(struct lbs_private *priv)
 
        lbs_deb_thread("lbs_interrupt: intcounter=%d\n", priv->intcounter);
 
-       if (spin_trylock(&priv->driver_lock)) {
-               spin_unlock(&priv->driver_lock);
+       if (!spin_is_locked(&priv->driver_lock)) {
                printk(KERN_CRIT "%s called without driver_lock held\n", __func__);
                WARN_ON(1);
        }