Skip to contentSkip to conversation

add DEVICE_ATTR_RO(name)

PATCH New [email protected] 1 participant 1 message May 8, 2006 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 add DEVICE_ATTR_RO(name)

From: Hiroshi DOYU <[email protected]>

add DEVICE_ATTR_RO(name) as __ATTR_RO(_name) in "sysfs.h"

---

 include/linux/device.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

95e30aadfc789d4791777f27cca139c8418f554d

include/linux/device.h +3 -0
index f6e72a6..5763b8a 100644
@@ -300,6 +300,9 @@ struct device_attribute {
 #define DEVICE_ATTR(_name,_mode,_show,_store) \
 struct device_attribute dev_attr_##_name = __ATTR(_name,_mode,_show,_store)
 
+#define DEVICE_ATTR_RO(_name) \
+struct device_attribute dev_attr_##_name = __ATTR_RO(_name)
+
 extern int device_create_file(struct device *device, struct device_attribute * entry);
 extern void device_remove_file(struct device * dev, struct device_attribute * attr);
 struct device {
Signature · 1 line
1.3.2.g8611