diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-14 19:05:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-16 13:57:36 -0400 |
commit | b9b3259746d77f4fcb786e2a43c25bcc40773755 (patch) | |
tree | 220c5b779b174f5464ab64e68a85c1889a874b22 /include | |
parent | ad81f0545ef01ea651886dddac4bef6cec930092 (diff) |
sysfs.h: add __ATTR_RW() macro
A number of parts of the kernel created their own version of this, might
as well have the sysfs core provide it instead.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sysfs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index e2cee22f578a..9cd20c8404e5 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -79,6 +79,8 @@ struct attribute_group { | |||
79 | .show = _name##_show, \ | 79 | .show = _name##_show, \ |
80 | } | 80 | } |
81 | 81 | ||
82 | #define __ATTR_RW(_name) __ATTR(_name, 0644, _name##_show, _name##_store) | ||
83 | |||
82 | #define __ATTR_NULL { .attr = { .name = NULL } } | 84 | #define __ATTR_NULL { .attr = { .name = NULL } } |
83 | 85 | ||
84 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 86 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |