diff options
Diffstat (limited to 'd3.patch')
| -rw-r--r-- | d3.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/d3.patch b/d3.patch new file mode 100644 index 00000000000000..2a56c6724a2625 --- /dev/null +++ b/d3.patch @@ -0,0 +1,50 @@ +--- + net/ieee802154/wpan-class.c | 21 ++++++++++++--------- + 1 file changed, 12 insertions(+), 9 deletions(-) + +--- a/net/ieee802154/wpan-class.c ++++ b/net/ieee802154/wpan-class.c +@@ -36,7 +36,8 @@ static ssize_t name ## _show(struct devi + ret = snprintf(buf, PAGE_SIZE, format_string "\n", args); \ + mutex_unlock(&phy->pib_lock); \ + return ret; \ +-} ++} \ ++static DEVICE_ATTR_RO(name); + + #define MASTER_SHOW(field, format_string) \ + MASTER_SHOW_COMPLEX(field, format_string, phy->field) +@@ -66,15 +67,17 @@ static ssize_t channels_supported_show(s + mutex_unlock(&phy->pib_lock); + return len; + } ++static DEVICE_ATTR_RO(channels_supported); + +-static struct device_attribute pmib_attrs[] = { +- __ATTR_RO(current_channel), +- __ATTR_RO(current_page), +- __ATTR_RO(channels_supported), +- __ATTR_RO(transmit_power), +- __ATTR_RO(cca_mode), +- {}, ++static struct attribute *pmib_attrs[] = { ++ &dev_attr_current_channel.attr, ++ &dev_attr_current_page.attr, ++ &dev_attr_channels_supported.attr, ++ &dev_attr_transmit_power.attr, ++ &dev_attr_cca_mode.attr, ++ NULL, + }; ++ATTRIBUTE_GROUPS(pmib); + + static void wpan_phy_release(struct device *d) + { +@@ -85,7 +88,7 @@ static void wpan_phy_release(struct devi + static struct class wpan_phy_class = { + .name = "ieee802154", + .dev_release = wpan_phy_release, +- .dev_attrs = pmib_attrs, ++ .dev_groups = pmib_groups, + }; + + static DEFINE_MUTEX(wpan_phy_mutex); |
