Skip to content

Commit

Permalink
libertas: use spin_is_locked() instead of spin_trylock() in lbs_inter…
Browse files Browse the repository at this point in the history
…rupt()

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>
  • Loading branch information
David Woodhouse authored and David S. Miller committed Jan 28, 2008
1 parent 8606213 commit f5a3ea6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/libertas/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit f5a3ea6

Please sign in to comment.