提交 f1f74825 编写于 作者: D David Kilroy 提交者: John W. Linville

cfg80211: add wrapper function to get wiphy from priv pointer

Signed-off-by: NDavid Kilroy <kilroyd@googlemail.com>
Acked-by: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 90e3012e
......@@ -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
*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册