aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/core.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-06 21:56:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:02:32 -0400
commit4d0c8aead32ecdbe1310ad473b3637991f560865 (patch)
tree6d7bbfc1676e5cf4d21dd61fc5ace1c041622c2c /net/wireless/core.h
parentc1e6fb1aad0d4d4f032d46b6bab093a41c6c82bf (diff)
cfg80211: properly name driver locking
Currently we call that cfg80211_put_dev(), but that is misleading. With the new convention of using 'rdev' for registered_device variables, also call that function cfg80211_unlock_rdev(). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r--net/wireless/core.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 4554453c116..92da612b3f9 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -146,7 +146,7 @@ __cfg80211_drv_from_info(struct genl_info *info);
146 * If successful, it returns non-NULL and also locks 146 * If successful, it returns non-NULL and also locks
147 * the driver's mutex! 147 * the driver's mutex!
148 * 148 *
149 * This means that you need to call cfg80211_put_dev() 149 * This means that you need to call cfg80211_unlock_rdev()
150 * before being allowed to acquire &cfg80211_mutex! 150 * before being allowed to acquire &cfg80211_mutex!
151 * 151 *
152 * This is necessary because we need to lock the global 152 * This is necessary because we need to lock the global
@@ -170,7 +170,11 @@ struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx);
170extern struct cfg80211_registered_device * 170extern struct cfg80211_registered_device *
171cfg80211_get_dev_from_ifindex(int ifindex); 171cfg80211_get_dev_from_ifindex(int ifindex);
172 172
173extern void cfg80211_put_dev(struct cfg80211_registered_device *drv); 173static inline void cfg80211_unlock_rdev(struct cfg80211_registered_device *drv)
174{
175 BUG_ON(IS_ERR(drv) || !drv);
176 mutex_unlock(&drv->mtx);
177}
174 178
175/* free object */ 179/* free object */
176extern void cfg80211_dev_free(struct cfg80211_registered_device *drv); 180extern void cfg80211_dev_free(struct cfg80211_registered_device *drv);