From: Guenter Roeck <li...@roeck-us.net>

Document variables defined in struct attribute_group to ensure
correct usage.

Signed-off-by: Guenter Roeck <li...@roeck-us.net>
Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
---
 include/linux/sysfs.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index ddad161..99382c0 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -57,6 +57,21 @@ do {                                                 \
 #define sysfs_attr_init(attr) do {} while (0)
 #endif
 
+/**
+ * struct attribute_group - data structure used to declare an attribute group.
+ * @name:      Optional: Attribute group name
+ *             If specified, the attribute group will be created in
+ *             a new subdirectory with this name.
+ * @is_visible:        Optional: Function to return permissions associated 
with an
+ *             attribute of the group. Will be called repeatedly for each
+ *             attribute in the group. Only read/write permissions as well as
+ *             SYSFS_PREALLOC are accepted. Must return 0 if an attribute is
+ *             not visible. The returned value will replace static permissions
+ *             defined in struct attribute or struct bin_attribute.
+ * @attrs:     Pointer to NULL terminated list of attributes.
+ * @bin_attrs: Pointer to NULL terminated list of binary attributes.
+ *             Either attrs or bin_attrs or both must be provided.
+ */
 struct attribute_group {
        const char              *name;
        umode_t                 (*is_visible)(struct kobject *,
-- 
2.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to