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 547b1e271ac9f00b59b47edd5f23aa8cc3d56f59..5e803a0e4e72837bf8bb27fe881a8257673a0728 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);