From c0371423dbc4c824fd845f2776ec28c64e514f7e Mon Sep 17 00:00:00 2001 From: Arik Nemtsov Date: Wed, 9 Apr 2014 15:04:13 +0300 Subject: [PATCH] backports: device: don't redefine DEVICE_ATTR_RO Some old custom kernels have it defined. Signed-off-by: Arik Nemtsov Signed-off-by: Emmanuel Grumbach Signed-off-by: Luis R. Rodriguez --- 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 ebfc01a5b49e..a54756a49ff2 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 -- 2.30.2