diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2021-05-19 19:33:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-21 23:13:13 +0300 |
commit | 46ad057245912fc8a49e18f6f8b57f80ab8d4dc1 (patch) | |
tree | 095a9b675ddfbd92c483a486d7e6df453b97dfc3 /include/linux/sysfs.h | |
parent | 208012f051636d1ab8b7f7f86d6988d4b39758af (diff) | |
download | linux-46ad057245912fc8a49e18f6f8b57f80ab8d4dc1.tar.xz |
sysfs: Add helper BIN_ATTRIBUTE_GROUPS
New helper BIN_ATTRIBUTE_GROUPS() does the same as ATTRIBUTE_GROUPS(),
just for binary attributes.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/e20db248-ed30-cf5d-a37c-b538dceaa5b2@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r-- | include/linux/sysfs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index d76a1ddf83a3..a12556a4b93a 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -162,6 +162,12 @@ static const struct attribute_group _name##_group = { \ }; \ __ATTRIBUTE_GROUPS(_name) +#define BIN_ATTRIBUTE_GROUPS(_name) \ +static const struct attribute_group _name##_group = { \ + .bin_attrs = _name##_attrs, \ +}; \ +__ATTRIBUTE_GROUPS(_name) + struct file; struct vm_area_struct; struct address_space; |