[PATCH v2 14/19] backports: add sysfs api backport for ieee802154

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 .../76-sysfs-api/net_ieee802154_wpan-class.patch   |   30 ++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 patches/collateral-evolutions/network/76-sysfs-api/net_ieee802154_wpan-class.patch

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 0000000..a323ad9
--- /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;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux