diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2009-09-28 17:01:20 +0200 |
---|---|---|
committer | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2009-11-06 12:29:50 +0100 |
commit | e9cf356c0c6b975fda84b15a5abdd1db88d74f84 (patch) | |
tree | 50b66c4f169939727f7c4592a8a1b44fe13eba79 /include/net/wpan-phy.h | |
parent | wpan-phy: allow specifying a per-page channel mask (diff) | |
download | linux-e9cf356c0c6b975fda84b15a5abdd1db88d74f84.tar.xz linux-e9cf356c0c6b975fda84b15a5abdd1db88d74f84.zip |
wpan-phy: follow usual patter of devices registration
Follow the usual pattern of devices registration by adding new function
(wpan_phy_set_dev) that sets child->parent relationship and removing
parent argument from wpan_phy_register call.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'include/net/wpan-phy.h')
-rw-r--r-- | include/net/wpan-phy.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/net/wpan-phy.h b/include/net/wpan-phy.h index 7b7fc581e673..f63537c17363 100644 --- a/include/net/wpan-phy.h +++ b/include/net/wpan-phy.h @@ -45,7 +45,11 @@ struct wpan_phy { }; struct wpan_phy *wpan_phy_alloc(size_t priv_size); -int wpan_phy_register(struct device *parent, struct wpan_phy *phy); +static inline void wpan_phy_set_dev(struct wpan_phy *phy, struct device *dev) +{ + phy->dev.parent = dev; +} +int wpan_phy_register(struct wpan_phy *phy); void wpan_phy_unregister(struct wpan_phy *phy); void wpan_phy_free(struct wpan_phy *phy); /* Same semantics as for class_for_each_device */ |