浏览代码

wpan-phy: add a helper to put the wpan_phy device

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Dmitry Eremin-Solenikov 15 年之前
父节点
当前提交
69d9ab96f9
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      include/net/wpan-phy.h

+ 6 - 0
include/net/wpan-phy.h

@@ -56,6 +56,12 @@ static inline void *wpan_phy_priv(struct wpan_phy *phy)
 }
 }
 
 
 struct wpan_phy *wpan_phy_find(const char *str);
 struct wpan_phy *wpan_phy_find(const char *str);
+
+static inline void wpan_phy_put(struct wpan_phy *phy)
+{
+	put_device(&phy->dev);
+}
+
 static inline const char *wpan_phy_name(struct wpan_phy *phy)
 static inline const char *wpan_phy_name(struct wpan_phy *phy)
 {
 {
 	return dev_name(&phy->dev);
 	return dev_name(&phy->dev);