diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-06 18:17:53 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-06 21:53:58 +0400 |
commit | a24d52f390a77ce90dc8cf0cd75d27ec0a6ea3f8 (patch) | |
tree | 22bd26711179036d5c417ec5fc0c56de82fe0a07 /drivers/net/wireless/iwlwifi/iwl-scan.c | |
parent | e95b743536937a72e1560c85696b425c5d1a1c18 (diff) | |
download | linux-a24d52f390a77ce90dc8cf0cd75d27ec0a6ea3f8.tar.xz |
iwlwifi: fix locking assertions
spin_is_locked() can return zero on some (UP?)
configurations because locks don't exist, and
that causes an endless amount of warnings. Use
lockdep_assert_held() instead, which has two
advantages:
1) it verifies the current task is holding
the lock or mutex
2) it compiles away completely when lockdep
is not enabled
Cc: stable@kernel.org [2.6.34+, maybe only parts of patch]
Reported-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-scan.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index b0c6b0473901..a4b3663a262f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c @@ -298,7 +298,7 @@ EXPORT_SYMBOL(iwl_init_scan_params); static int iwl_scan_initiate(struct iwl_priv *priv, struct ieee80211_vif *vif) { - WARN_ON(!mutex_is_locked(&priv->mutex)); + lockdep_assert_held(&priv->mutex); IWL_DEBUG_INFO(priv, "Starting scan...\n"); set_bit(STATUS_SCANNING, &priv->status); |