aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-03-02 09:10:04 -0500
committerMarcel Holtmann <marcel@holtmann.org>2015-03-14 12:11:30 -0400
commitc4dd7471de03f0e4278265e08af2923243496db0 (patch)
tree36f4114d4d3643d36839eb1d4ae8474bef53e644 /net
parent965e613d299cdcc9393765f68b92591f20ed0dcc (diff)
ieee802154: change wpan-phy name to phy
Currently the wpan_phy under /sys/class/ieee802154/ is named as "wpan-phy#", this patch will change the name to phy. This will introduce the same naming convention like wireless. Note: wpan-tools users will not type "wpan-phy#" anymore, just a simple "phy#" is enough. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r--net/ieee802154/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ieee802154/core.c b/net/ieee802154/core.c
index 888d0991c761..2ee00e8a0308 100644
--- a/net/ieee802154/core.c
+++ b/net/ieee802154/core.c
@@ -25,6 +25,9 @@
25#include "sysfs.h" 25#include "sysfs.h"
26#include "core.h" 26#include "core.h"
27 27
28/* name for sysfs, %d is appended */
29#define PHY_NAME "phy"
30
28/* RCU-protected (and RTNL for writers) */ 31/* RCU-protected (and RTNL for writers) */
29LIST_HEAD(cfg802154_rdev_list); 32LIST_HEAD(cfg802154_rdev_list);
30int cfg802154_rdev_list_generation; 33int cfg802154_rdev_list_generation;
@@ -122,7 +125,7 @@ wpan_phy_new(const struct cfg802154_ops *ops, size_t priv_size)
122 125
123 INIT_LIST_HEAD(&rdev->wpan_dev_list); 126 INIT_LIST_HEAD(&rdev->wpan_dev_list);
124 device_initialize(&rdev->wpan_phy.dev); 127 device_initialize(&rdev->wpan_phy.dev);
125 dev_set_name(&rdev->wpan_phy.dev, "wpan-phy%d", rdev->wpan_phy_idx); 128 dev_set_name(&rdev->wpan_phy.dev, PHY_NAME "%d", rdev->wpan_phy_idx);
126 129
127 rdev->wpan_phy.dev.class = &wpan_phy_class; 130 rdev->wpan_phy.dev.class = &wpan_phy_class;
128 rdev->wpan_phy.dev.platform_data = rdev; 131 rdev->wpan_phy.dev.platform_data = rdev;