sysfs: Add sysfs_merge_group() and sysfs_unmerge_group()
This patch (as1420) adds sysfs_merge_group() and sysfs_unmerge_group() functions, allowing drivers easily to add and remove sets of attributes to a pre-existing attribute group directory. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
098dff738a
commit
69d44ffbd7
@@ -164,6 +164,10 @@ 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,
|
||||
const struct attribute *attr, const char *group);
|
||||
int sysfs_merge_group(struct kobject *kobj,
|
||||
const struct attribute_group *grp);
|
||||
void sysfs_unmerge_group(struct kobject *kobj,
|
||||
const struct attribute_group *grp);
|
||||
|
||||
void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr);
|
||||
void sysfs_notify_dirent(struct sysfs_dirent *sd);
|
||||
@@ -302,6 +306,17 @@ static inline void sysfs_remove_file_from_group(struct kobject *kobj,
|
||||
{
|
||||
}
|
||||
|
||||
static inline int sysfs_merge_group(struct kobject *kobj,
|
||||
const struct attribute_group *grp)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void sysfs_unmerge_group(struct kobject *kobj,
|
||||
const struct attribute_group *grp)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void sysfs_notify(struct kobject *kobj, const char *dir,
|
||||
const char *attr)
|
||||
{
|
||||
|
Reference in New Issue
Block a user