The macros BIN_ATTR_RO/BIN_ATTR_WO/BIN_ATTR_WR and BIN_ATTR_ADMIN_RO/BIN_ATTR_ADMIN_RW already exist. To complete the collection also add BIN_ATTR_ADMIN_WO. Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx> --- include/linux/sysfs.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 0f2fcd244523f050c5286f19d4fe1846506f9214..bcae49105e54a79b7d8a610f17212cb5920c205a 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -385,12 +385,18 @@ struct bin_attribute bin_attr_##_name = __BIN_ATTR_RW(_name, _size) #define __BIN_ATTR_ADMIN_RO(_name, _size) \ __BIN_ATTR(_name, 0400, _name##_read, NULL, _size) +#define __BIN_ATTR_ADMIN_WO(_name, _size) \ + __BIN_ATTR(_name, 0200, NULL, _name##_write, _size) + #define __BIN_ATTR_ADMIN_RW(_name, _size) \ __BIN_ATTR(_name, 0600, _name##_read, _name##_write, _size) #define BIN_ATTR_ADMIN_RO(_name, _size) \ struct bin_attribute bin_attr_##_name = __BIN_ATTR_ADMIN_RO(_name, _size) +#define BIN_ATTR_ADMIN_WO(_name, _size) \ +struct bin_attribute bin_attr_##_name = __BIN_ATTR_ADMIN_WO(_name, _size) + #define BIN_ATTR_ADMIN_RW(_name, _size) \ struct bin_attribute bin_attr_##_name = __BIN_ATTR_ADMIN_RW(_name, _size) -- 2.47.1