Skip to content

Commit 022d07e

Browse files
alexaringholtmann
authored andcommitted
ieee802154: remove deprecated sysfs entries
It's only necessary to offer the name and index, others value are available over netlink. Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent c4dd747 commit 022d07e

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

net/ieee802154/sysfs.c

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -48,49 +48,6 @@ static ssize_t name_show(struct device *dev,
4848
}
4949
static DEVICE_ATTR_RO(name);
5050

51-
#define MASTER_SHOW_COMPLEX(name, format_string, args...) \
52-
static ssize_t name ## _show(struct device *dev, \
53-
struct device_attribute *attr, char *buf) \
54-
{ \
55-
struct wpan_phy *phy = container_of(dev, struct wpan_phy, dev); \
56-
int ret; \
57-
\
58-
mutex_lock(&phy->pib_lock); \
59-
ret = snprintf(buf, PAGE_SIZE, format_string "\n", args); \
60-
mutex_unlock(&phy->pib_lock); \
61-
return ret; \
62-
} \
63-
static DEVICE_ATTR_RO(name)
64-
65-
#define MASTER_SHOW(field, format_string) \
66-
MASTER_SHOW_COMPLEX(field, format_string, phy->field)
67-
68-
MASTER_SHOW(current_channel, "%d");
69-
MASTER_SHOW(current_page, "%d");
70-
MASTER_SHOW(transmit_power, "%d +- 1 dB");
71-
MASTER_SHOW_COMPLEX(cca_mode, "%d", phy->cca.mode);
72-
73-
static ssize_t channels_supported_show(struct device *dev,
74-
struct device_attribute *attr,
75-
char *buf)
76-
{
77-
struct wpan_phy *phy = container_of(dev, struct wpan_phy, dev);
78-
int ret;
79-
int i, len = 0;
80-
81-
mutex_lock(&phy->pib_lock);
82-
for (i = 0; i < 32; i++) {
83-
ret = snprintf(buf + len, PAGE_SIZE - len,
84-
"%#09x\n", phy->channels_supported[i]);
85-
if (ret < 0)
86-
break;
87-
len += ret;
88-
}
89-
mutex_unlock(&phy->pib_lock);
90-
return len;
91-
}
92-
static DEVICE_ATTR_RO(channels_supported);
93-
9451
static void wpan_phy_release(struct device *dev)
9552
{
9653
struct cfg802154_registered_device *rdev = dev_to_rdev(dev);
@@ -101,12 +58,6 @@ static void wpan_phy_release(struct device *dev)
10158
static struct attribute *pmib_attrs[] = {
10259
&dev_attr_index.attr,
10360
&dev_attr_name.attr,
104-
/* below will be removed soon */
105-
&dev_attr_current_channel.attr,
106-
&dev_attr_current_page.attr,
107-
&dev_attr_channels_supported.attr,
108-
&dev_attr_transmit_power.attr,
109-
&dev_attr_cca_mode.attr,
11061
NULL,
11162
};
11263
ATTRIBUTE_GROUPS(pmib);

0 commit comments

Comments
 (0)