From: Jonathan DE CESCO Date: Mon, 26 May 2014 14:15:36 +0000 (+0300) Subject: backports: Avoid multiple definition of DEVICE_ATTR_RW for older kernels X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=dc2c1472a9b05ff5e574d0d14e6251e8af0a025a;p=openwrt%2Fstaging%2Fblogic.git backports: Avoid multiple definition of DEVICE_ATTR_RW for older kernels This definition may exists on non-vanilla kernels. Signed-off-by: Jonathan DE CESCO Signed-off-by: Emmanuel Grumbach Signed-off-by: Hauke Mehrtens --- diff --git a/backport/backport-include/linux/device.h b/backport/backport-include/linux/device.h index 3403896db12c..e574d4739bbc 100644 --- a/backport/backport-include/linux/device.h +++ b/backport/backport-include/linux/device.h @@ -107,9 +107,11 @@ backport_device_release_driver(struct device *dev) #define DEVICE_ATTR_RO(_name) \ struct device_attribute dev_attr_ ## _name = __ATTR_RO(_name); #endif +#ifndef DEVICE_ATTR_RW #define DEVICE_ATTR_RW(_name) \ struct device_attribute dev_attr_ ## _name = __ATTR_RW(_name) #endif +#endif #define ATTRIBUTE_GROUPS_BACKPORT(_name) \ static struct BP_ATTR_GRP_STRUCT _name##_dev_attrs[ARRAY_SIZE(_name##_attrs)];\