aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sysfs/file.c')
-rw-r--r--fs/sysfs/file.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index d2bb7ed8fa74..b278bf922d44 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -569,7 +569,6 @@ int sysfs_add_file(struct sysfs_dirent *dir_sd, const struct attribute *attr,
569 * @kobj: object we're creating for. 569 * @kobj: object we're creating for.
570 * @attr: attribute descriptor. 570 * @attr: attribute descriptor.
571 */ 571 */
572
573int sysfs_create_file(struct kobject * kobj, const struct attribute * attr) 572int sysfs_create_file(struct kobject * kobj, const struct attribute * attr)
574{ 573{
575 BUG_ON(!kobj || !kobj->sd || !attr); 574 BUG_ON(!kobj || !kobj->sd || !attr);
@@ -577,6 +576,7 @@ int sysfs_create_file(struct kobject * kobj, const struct attribute * attr)
577 return sysfs_add_file(kobj->sd, attr, SYSFS_KOBJ_ATTR); 576 return sysfs_add_file(kobj->sd, attr, SYSFS_KOBJ_ATTR);
578 577
579} 578}
579EXPORT_SYMBOL_GPL(sysfs_create_file);
580 580
581int sysfs_create_files(struct kobject *kobj, const struct attribute **ptr) 581int sysfs_create_files(struct kobject *kobj, const struct attribute **ptr)
582{ 582{
@@ -590,6 +590,7 @@ int sysfs_create_files(struct kobject *kobj, const struct attribute **ptr)
590 sysfs_remove_file(kobj, ptr[i]); 590 sysfs_remove_file(kobj, ptr[i]);
591 return err; 591 return err;
592} 592}
593EXPORT_SYMBOL_GPL(sysfs_create_files);
593 594
594/** 595/**
595 * sysfs_add_file_to_group - add an attribute file to a pre-existing group. 596 * sysfs_add_file_to_group - add an attribute file to a pre-existing group.
@@ -654,7 +655,6 @@ int sysfs_chmod_file(struct kobject *kobj, const struct attribute *attr,
654} 655}
655EXPORT_SYMBOL_GPL(sysfs_chmod_file); 656EXPORT_SYMBOL_GPL(sysfs_chmod_file);
656 657
657
658/** 658/**
659 * sysfs_remove_file - remove an object attribute. 659 * sysfs_remove_file - remove an object attribute.
660 * @kobj: object we're acting for. 660 * @kobj: object we're acting for.
@@ -662,7 +662,6 @@ EXPORT_SYMBOL_GPL(sysfs_chmod_file);
662 * 662 *
663 * Hash the attribute name and kill the victim. 663 * Hash the attribute name and kill the victim.
664 */ 664 */
665
666void sysfs_remove_file(struct kobject * kobj, const struct attribute * attr) 665void sysfs_remove_file(struct kobject * kobj, const struct attribute * attr)
667{ 666{
668 const void *ns; 667 const void *ns;
@@ -672,6 +671,7 @@ void sysfs_remove_file(struct kobject * kobj, const struct attribute * attr)
672 671
673 sysfs_hash_and_remove(kobj->sd, ns, attr->name); 672 sysfs_hash_and_remove(kobj->sd, ns, attr->name);
674} 673}
674EXPORT_SYMBOL_GPL(sysfs_remove_file);
675 675
676void sysfs_remove_files(struct kobject * kobj, const struct attribute **ptr) 676void sysfs_remove_files(struct kobject * kobj, const struct attribute **ptr)
677{ 677{
@@ -679,6 +679,7 @@ void sysfs_remove_files(struct kobject * kobj, const struct attribute **ptr)
679 for (i = 0; ptr[i]; i++) 679 for (i = 0; ptr[i]; i++)
680 sysfs_remove_file(kobj, ptr[i]); 680 sysfs_remove_file(kobj, ptr[i]);
681} 681}
682EXPORT_SYMBOL_GPL(sysfs_remove_files);
682 683
683/** 684/**
684 * sysfs_remove_file_from_group - remove an attribute file from a group. 685 * sysfs_remove_file_from_group - remove an attribute file from a group.
@@ -793,9 +794,3 @@ int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *),
793 return 0; 794 return 0;
794} 795}
795EXPORT_SYMBOL_GPL(sysfs_schedule_callback); 796EXPORT_SYMBOL_GPL(sysfs_schedule_callback);
796
797
798EXPORT_SYMBOL_GPL(sysfs_create_file);
799EXPORT_SYMBOL_GPL(sysfs_remove_file);
800EXPORT_SYMBOL_GPL(sysfs_remove_files);
801EXPORT_SYMBOL_GPL(sysfs_create_files);