add DEVICE_ATTR_RO(name)
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"
Signed-off-by Hiroshi DOYU <[email protected]>
---
include/linux/device.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
95e30aadfc789d4791777f27cca139c8418f554d
include/linux/device.h +3 -0
@@ -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