Skip to content

Commit

Permalink
cfg80211: convert mutex assert to macro
Browse files Browse the repository at this point in the history
That will make the various cases where the WARN_ON
can happen distinguishable.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Apr 22, 2009
1 parent 4312a86 commit 7edfab7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/wireless/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ bool wiphy_idx_valid(int wiphy_idx)
extern struct mutex cfg80211_mutex;
extern struct list_head cfg80211_drv_list;

static inline void assert_cfg80211_lock(void)
{
WARN_ON(!mutex_is_locked(&cfg80211_mutex));
}
#define assert_cfg80211_lock() WARN_ON(!mutex_is_locked(&cfg80211_mutex))

/*
* You can use this to mark a wiphy_idx as not having an associated wiphy.
Expand Down

0 comments on commit 7edfab7

Please sign in to comment.