summaryrefslogtreecommitdiff
path: root/backport/backport-include/linux/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'backport/backport-include/linux/device.h')
-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 ebfc01a5..a54756a4 100644
--- a/backport/backport-include/linux/device.h
+++ b/backport/backport-include/linux/device.h
@@ -193,8 +193,10 @@ backport_device_release_driver(struct device *dev)
#endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(3,6,0) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
+#ifndef DEVICE_ATTR_RO
#define DEVICE_ATTR_RO(_name) \
struct device_attribute dev_attr_ ## _name = __ATTR_RO(_name);
+#endif
#define DEVICE_ATTR_RW(_name) \
struct device_attribute dev_attr_ ## _name = __ATTR_RW(_name)
#endif