sysfs.h: Use octal permissions
Use the more common and preferred octal directly. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8c9076b07c
commit
353c6ddaa9
|
@ -113,7 +113,7 @@ struct attribute_group {
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __ATTR_RO(_name) { \
|
#define __ATTR_RO(_name) { \
|
||||||
.attr = { .name = __stringify(_name), .mode = S_IRUGO }, \
|
.attr = { .name = __stringify(_name), .mode = 0444 }, \
|
||||||
.show = _name##_show, \
|
.show = _name##_show, \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,12 +124,11 @@ struct attribute_group {
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __ATTR_WO(_name) { \
|
#define __ATTR_WO(_name) { \
|
||||||
.attr = { .name = __stringify(_name), .mode = S_IWUSR }, \
|
.attr = { .name = __stringify(_name), .mode = 0200 }, \
|
||||||
.store = _name##_store, \
|
.store = _name##_store, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __ATTR_RW(_name) __ATTR(_name, (S_IWUSR | S_IRUGO), \
|
#define __ATTR_RW(_name) __ATTR(_name, 0644, _name##_show, _name##_store)
|
||||||
_name##_show, _name##_store)
|
|
||||||
|
|
||||||
#define __ATTR_NULL { .attr = { .name = NULL } }
|
#define __ATTR_NULL { .attr = { .name = NULL } }
|
||||||
|
|
||||||
|
@ -192,14 +191,13 @@ struct bin_attribute {
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __BIN_ATTR_RO(_name, _size) { \
|
#define __BIN_ATTR_RO(_name, _size) { \
|
||||||
.attr = { .name = __stringify(_name), .mode = S_IRUGO }, \
|
.attr = { .name = __stringify(_name), .mode = 0444 }, \
|
||||||
.read = _name##_read, \
|
.read = _name##_read, \
|
||||||
.size = _size, \
|
.size = _size, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __BIN_ATTR_RW(_name, _size) __BIN_ATTR(_name, \
|
#define __BIN_ATTR_RW(_name, _size) \
|
||||||
(S_IWUSR | S_IRUGO), _name##_read, \
|
__BIN_ATTR(_name, 0644, _name##_read, _name##_write, _size)
|
||||||
_name##_write, _size)
|
|
||||||
|
|
||||||
#define __BIN_ATTR_NULL __ATTR_NULL
|
#define __BIN_ATTR_NULL __ATTR_NULL
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue