mirror of
https://github.com/joel16/android_kernel_sony_msm8994_rework.git
synced 2024-11-23 11:59:58 +00:00
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> Change-Id: Ie5fe75b769b615e034e8c0c84224571a6ad3bf11
This commit is contained in:
parent
f4967f2ee8
commit
6f0e5ccd55
@ -79,6 +79,8 @@ struct attribute_group {
|
||||
.show = _name##_show, \
|
||||
}
|
||||
|
||||
#define __ATTR_RW(_name) __ATTR(_name, 0644, _name##_show, _name##_store)
|
||||
|
||||
#define __ATTR_NULL { .attr = { .name = NULL } }
|
||||
|
||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||
|
@ -232,8 +232,6 @@ static ssize_t stable_pages_required_show(struct device *dev,
|
||||
bdi_cap_stable_pages_required(bdi) ? 1 : 0);
|
||||
}
|
||||
|
||||
#define __ATTR_RW(attr) __ATTR(attr, 0644, attr##_show, attr##_store)
|
||||
|
||||
static struct device_attribute bdi_dev_attrs[] = {
|
||||
__ATTR_RW(read_ahead_kb),
|
||||
__ATTR_RW(min_ratio),
|
||||
|
Loading…
Reference in New Issue
Block a user