Commit f601379f authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann

ieee802154: rename wpan_phy_alloc

This patch renames the wpan_phy_alloc function to wpan_phy_new. This
naming convention is like wireless and "wiphy_new" function.
Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 5fb3f026
...@@ -88,7 +88,7 @@ struct wpan_dev { ...@@ -88,7 +88,7 @@ struct wpan_dev {
#define to_phy(_dev) container_of(_dev, struct wpan_phy, dev) #define to_phy(_dev) container_of(_dev, struct wpan_phy, dev)
struct wpan_phy * struct wpan_phy *
wpan_phy_alloc(const struct cfg802154_ops *ops, size_t priv_size); wpan_phy_new(const struct cfg802154_ops *ops, size_t priv_size);
static inline void wpan_phy_set_dev(struct wpan_phy *phy, struct device *dev) static inline void wpan_phy_set_dev(struct wpan_phy *phy, struct device *dev)
{ {
phy->dev.parent = dev; phy->dev.parent = dev;
......
...@@ -70,7 +70,7 @@ int wpan_phy_for_each(int (*fn)(struct wpan_phy *phy, void *data), ...@@ -70,7 +70,7 @@ int wpan_phy_for_each(int (*fn)(struct wpan_phy *phy, void *data),
EXPORT_SYMBOL(wpan_phy_for_each); EXPORT_SYMBOL(wpan_phy_for_each);
struct wpan_phy * struct wpan_phy *
wpan_phy_alloc(const struct cfg802154_ops *ops, size_t priv_size) wpan_phy_new(const struct cfg802154_ops *ops, size_t priv_size)
{ {
static atomic_t wpan_phy_counter = ATOMIC_INIT(0); static atomic_t wpan_phy_counter = ATOMIC_INIT(0);
struct cfg802154_registered_device *rdev; struct cfg802154_registered_device *rdev;
...@@ -105,7 +105,7 @@ wpan_phy_alloc(const struct cfg802154_ops *ops, size_t priv_size) ...@@ -105,7 +105,7 @@ wpan_phy_alloc(const struct cfg802154_ops *ops, size_t priv_size)
return &rdev->wpan_phy; return &rdev->wpan_phy;
} }
EXPORT_SYMBOL(wpan_phy_alloc); EXPORT_SYMBOL(wpan_phy_new);
int wpan_phy_register(struct wpan_phy *phy) int wpan_phy_register(struct wpan_phy *phy)
{ {
......
...@@ -86,7 +86,7 @@ ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops) ...@@ -86,7 +86,7 @@ ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops)
priv_size = ALIGN(sizeof(*local), NETDEV_ALIGN) + priv_data_len; priv_size = ALIGN(sizeof(*local), NETDEV_ALIGN) + priv_data_len;
phy = wpan_phy_alloc(&mac802154_config_ops, priv_size); phy = wpan_phy_new(&mac802154_config_ops, priv_size);
if (!phy) { if (!phy) {
pr_err("failure to allocate master IEEE802.15.4 device\n"); pr_err("failure to allocate master IEEE802.15.4 device\n");
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment