git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sysfs.h: add ATTRIBUTE_GROUPS() macro
[pandora-kernel.git]
/
include
/
linux
/
sysfs.h
diff --git
a/include/linux/sysfs.h
b/include/linux/sysfs.h
index
dac0859
..
2b9cd8d
100644
(file)
--- a/
include/linux/sysfs.h
+++ b/
include/linux/sysfs.h
@@
-80,6
+80,15
@@
struct attribute_group {
#define __ATTR_NULL { .attr = { .name = NULL } }
#define __ATTR_NULL { .attr = { .name = NULL } }
+#define ATTRIBUTE_GROUPS(name) \
+static const struct attribute_group name##_group = { \
+ .attrs = name##_attrs, \
+}; \
+static const struct attribute_group *name##_groups[] = { \
+ &name##_group, \
+ NULL, \
+}
+
#define attr_name(_attr) (_attr).attr.name
struct file;
#define attr_name(_attr) (_attr).attr.name
struct file;