Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7edfab7a authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

cfg80211: convert mutex assert to macro



That will make the various cases where the WARN_ON
can happen distinguishable.

Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4312a86b
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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.