From dc2c1472a9b05ff5e574d0d14e6251e8af0a025a Mon Sep 17 00:00:00 2001 From: Jonathan DE CESCO Date: Mon, 26 May 2014 17:15:36 +0300 Subject: [PATCH] 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 --- backport/backport-include/linux/device.h | 2 ++ 1 file changed, 2 insertions(+) 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)];\ -- 2.30.2