wpan-phy: add a helper to put the wpan_phy device
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Mon, 14 Sep 2009 14:11:03 +0000 (18:11 +0400)
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Fri, 6 Nov 2009 11:10:32 +0000 (14:10 +0300)
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
include/net/wpan-phy.h

index 547b1e2..5e803a0 100644 (file)
@@ -56,6 +56,12 @@ static inline void *wpan_phy_priv(struct wpan_phy *phy)
 }
 
 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)
 {
        return dev_name(&phy->dev);