summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-21 13:47:50 -0700
committerRichard Zhu <Richard.Zhu@freescale.com>2014-11-07 12:57:44 +0800
commit0e1c09e27232f3554925eb1a7edc0da263e3b0b6 (patch)
treee1e0952cfb7ae76ea13fe2865601f9034eed5780 /include
parent73a409b03c3af42fe17adc774c569439b85b50cf (diff)
sysfs: add sysfs_create/remove_groups()
These functions are being open-coded in 3 different places in the driver core, and other driver subsystems will want to start doing this as well, so move it to the sysfs core to keep it all in one place, where we know it is written properly. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Conflicts: drivers/base/bus.c (cherry picked from commit f1986282fe78586eddf3ae972a72eab7ca425aa7)
Diffstat (limited to 'include')
-rw-r--r--include/linux/sysfs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 3cbe5a732f5b..c497f38cbde5 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -178,10 +178,14 @@ void sysfs_delete_link(struct kobject *dir, struct kobject *targ,
int __must_check sysfs_create_group(struct kobject *kobj,
const struct attribute_group *grp);
+int __must_check sysfs_create_groups(struct kobject *kobj,
+ const struct attribute_group **groups);
int sysfs_update_group(struct kobject *kobj,
const struct attribute_group *grp);
void sysfs_remove_group(struct kobject *kobj,
const struct attribute_group *grp);
+void sysfs_remove_groups(struct kobject *kobj,
+ const struct attribute_group **groups);
int sysfs_add_file_to_group(struct kobject *kobj,
const struct attribute *attr, const char *group);
void sysfs_remove_file_from_group(struct kobject *kobj,