Patchwork [01/17] wpan-phy: add a helper to put the wpan_phy device

login
register
mail settings
Submitter Dmitry Eremin-Solenikov
Date Nov. 6, 2009, 12:39 p.m.
Message ID <1257511181-19403-2-git-send-email-dbaryshkov@gmail.com>
Download mbox | patch
Permalink /patch/37840/
State Accepted
Delegated to: David Miller
Headers show

Comments

Dmitry Eremin-Solenikov - Nov. 6, 2009, 12:39 p.m.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 include/net/wpan-phy.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Patch

diff --git a/include/net/wpan-phy.h b/include/net/wpan-phy.h
index 547b1e2..5e803a0 100644
--- a/include/net/wpan-phy.h
+++ b/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);
+
+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);