diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-08-19 01:37:59 +0200 |
---|---|---|
committer | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-08-27 11:43:04 -0700 |
commit | f65e232d6789c8cb8fc86b7efcba2b25a2abdbd4 (patch) | |
tree | 5a0c1c9a56c42885c90df6260e786b900efc8f0d | |
parent | 6b5ef745b1bf33ff8146a024730e3a8e6a7823c9 (diff) |
backports: add sysfs api backport for ieee802154
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
-rw-r--r-- | patches/collateral-evolutions/network/76-sysfs-api/net_ieee802154_wpan-class.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/patches/collateral-evolutions/network/76-sysfs-api/net_ieee802154_wpan-class.patch b/patches/collateral-evolutions/network/76-sysfs-api/net_ieee802154_wpan-class.patch new file mode 100644 index 00000000..a323ad97 --- /dev/null +++ b/patches/collateral-evolutions/network/76-sysfs-api/net_ieee802154_wpan-class.patch @@ -0,0 +1,30 @@ +--- a/net/ieee802154/wpan-class.c ++++ b/net/ieee802154/wpan-class.c +@@ -77,6 +77,7 @@ static struct attribute *pmib_attrs[] = + &dev_attr_cca_mode.attr, + NULL, + }; ++#define BP_ATTR_GRP_STRUCT device_attribute + ATTRIBUTE_GROUPS(pmib); + + static void wpan_phy_release(struct device *d) +@@ -88,7 +89,11 @@ static void wpan_phy_release(struct devi + static struct class wpan_phy_class = { + .name = "ieee802154", + .dev_release = wpan_phy_release, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) + .dev_groups = pmib_groups, ++#else ++ .dev_attrs = pmib_dev_attrs, ++#endif + }; + + static DEFINE_MUTEX(wpan_phy_mutex); +@@ -199,6 +204,7 @@ EXPORT_SYMBOL(wpan_phy_free); + static int __init wpan_phy_class_init(void) + { + int rc; ++ init_pmib_attrs(); + rc = class_register(&wpan_phy_class); + if (rc) + goto err; |