X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fsysfs.h;h=f62ff01e5f5994ab3cd2cb48b7097253e30e1808;hb=f2f37f58b1b933b06d6d84e80a31a1b500fb0db2;hp=e2cee22f578a6b24d7eb39c1ad298f15115bcb2d;hpb=5fb910d39133cc28ec25d4b2eea26b48f3ab4ef1;p=pandora-kernel.git diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index e2cee22f578a..f62ff01e5f59 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -79,6 +79,8 @@ struct attribute_group { .show = _name##_show, \ } +#define __ATTR_RW(_name) __ATTR(_name, 0644, _name##_show, _name##_store) + #define __ATTR_NULL { .attr = { .name = NULL } } #ifdef CONFIG_DEBUG_LOCK_ALLOC @@ -92,6 +94,15 @@ struct attribute_group { #define __ATTR_IGNORE_LOCKDEP __ATTR #endif +#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;