summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan DE CESCO <jonathan.de.cesco@intel.com>2014-05-26 17:15:36 +0300
committerHauke Mehrtens <hauke@hauke-m.de>2014-06-18 21:43:45 +0200
commitc56a703c741b7e6bf9e8f1c7e29c21b5f7ae350d (patch)
tree8f45b7dcc13d589880a638ca81afc6600592e28d
parent34cba01141927d054c415eab2d41bd814231fe65 (diff)
backports: Avoid multiple definition of DEVICE_ATTR_RW for older kernels
Upstream commit: dc2c1472a9b05ff5e574d0d14e6251e8af0a025a This definition may exists on non-vanilla kernels. Signed-off-by: Jonathan DE CESCO <jonathan.de.cesco@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--backport/backport-include/linux/device.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/backport/backport-include/linux/device.h b/backport/backport-include/linux/device.h
index d6226abb..d347b16d 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)];\