cfg80211: add wrapper function to get wiphy from priv pointer

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
David Kilroy 2009-06-18 23:21:13 +01:00 committed by John W. Linville
parent 90e3012e94
commit f1f74825fe
1 changed files with 11 additions and 0 deletions

View File

@ -1058,6 +1058,17 @@ static inline void *wiphy_priv(struct wiphy *wiphy)
return &wiphy->priv;
}
/**
* priv_to_wiphy - return the wiphy containing the priv
*
* @priv: a pointer previously returned by wiphy_priv
*/
static inline struct wiphy *priv_to_wiphy(void *priv)
{
BUG_ON(!priv);
return container_of(priv, struct wiphy, priv);
}
/**
* set_wiphy_dev - set device pointer for wiphy
*