projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
208012f
)
sysfs: Add helper BIN_ATTRIBUTE_GROUPS
author
Heiner Kallweit
<hkallweit1@gmail.com>
Wed, 19 May 2021 16:33:14 +0000
(18:33 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 21 May 2021 20:13:13 +0000
(22:13 +0200)
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>
include/linux/sysfs.h
patch
|
blob
|
history
diff --git
a/include/linux/sysfs.h
b/include/linux/sysfs.h
index d76a1ddf83a3144f379266a2b90f1aca883c7292..a12556a4b93ad0d1de96aca38c15f9c27ae7ace3 100644
(file)
--- 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;