aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-21 19:17:47 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-21 19:17:47 -0400
commit1b866757fc4cb135674f46c96909e900fcea91a2 (patch)
tree9a8cefab600be4165b21397229e2fb74d1c60e90 /fs/sysfs
parent9e2a47ed6443b7af1e5b91f59e8738c01fde45a9 (diff)
sysfs: fix placement of EXPORT_SYMBOL()
The export should happen after the function, not at the bottom of the file, so fix that up. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs')
-rw-r--r--fs/sysfs/bin.c6
-rw-r--r--fs/sysfs/file.c13
-rw-r--r--fs/sysfs/symlink.c9
3 files changed, 8 insertions, 20 deletions
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
index 15c68f9489ae..745f57f7d089 100644
--- a/fs/sysfs/bin.c
+++ b/fs/sysfs/bin.c
@@ -481,7 +481,6 @@ void unmap_bin_file(struct sysfs_dirent *attr_sd)
481 * @kobj: object. 481 * @kobj: object.
482 * @attr: attribute descriptor. 482 * @attr: attribute descriptor.
483 */ 483 */
484
485int sysfs_create_bin_file(struct kobject *kobj, 484int sysfs_create_bin_file(struct kobject *kobj,
486 const struct bin_attribute *attr) 485 const struct bin_attribute *attr)
487{ 486{
@@ -489,19 +488,16 @@ int sysfs_create_bin_file(struct kobject *kobj,
489 488
490 return sysfs_add_file(kobj->sd, &attr->attr, SYSFS_KOBJ_BIN_ATTR); 489 return sysfs_add_file(kobj->sd, &attr->attr, SYSFS_KOBJ_BIN_ATTR);
491} 490}
492 491EXPORT_SYMBOL_GPL(sysfs_create_bin_file);
493 492
494/** 493/**
495 * sysfs_remove_bin_file - remove binary file for object. 494 * sysfs_remove_bin_file - remove binary file for object.
496 * @kobj: object. 495 * @kobj: object.
497 * @attr: attribute descriptor. 496 * @attr: attribute descriptor.
498 */ 497 */
499
500void sysfs_remove_bin_file(struct kobject *kobj, 498void sysfs_remove_bin_file(struct kobject *kobj,
501 const struct bin_attribute *attr) 499 const struct bin_attribute *attr)
502{ 500{
503 sysfs_hash_and_remove(kobj->sd, NULL, attr->attr.name); 501 sysfs_hash_and_remove(kobj->sd, NULL, attr->attr.name);
504} 502}
505
506EXPORT_SYMBOL_GPL(sysfs_create_bin_file);
507EXPORT_SYMBOL_GPL(sysfs_remove_bin_file); 503EXPORT_SYMBOL_GPL(sysfs_remove_bin_file);
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);
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
index 8c940df97a52..bb097ad1d860 100644
--- a/fs/sysfs/symlink.c
+++ b/fs/sysfs/symlink.c
@@ -125,6 +125,7 @@ int sysfs_create_link(struct kobject *kobj, struct kobject *target,
125{ 125{
126 return sysfs_do_create_link(kobj, target, name, 1); 126 return sysfs_do_create_link(kobj, target, name, 1);
127} 127}
128EXPORT_SYMBOL_GPL(sysfs_create_link);
128 129
129/** 130/**
130 * sysfs_create_link_nowarn - create symlink between two objects. 131 * sysfs_create_link_nowarn - create symlink between two objects.
@@ -166,7 +167,6 @@ void sysfs_delete_link(struct kobject *kobj, struct kobject *targ,
166 * @kobj: object we're acting for. 167 * @kobj: object we're acting for.
167 * @name: name of the symlink to remove. 168 * @name: name of the symlink to remove.
168 */ 169 */
169
170void sysfs_remove_link(struct kobject * kobj, const char * name) 170void sysfs_remove_link(struct kobject * kobj, const char * name)
171{ 171{
172 struct sysfs_dirent *parent_sd = NULL; 172 struct sysfs_dirent *parent_sd = NULL;
@@ -178,6 +178,7 @@ void sysfs_remove_link(struct kobject * kobj, const char * name)
178 178
179 sysfs_hash_and_remove(parent_sd, NULL, name); 179 sysfs_hash_and_remove(parent_sd, NULL, name);
180} 180}
181EXPORT_SYMBOL_GPL(sysfs_remove_link);
181 182
182/** 183/**
183 * sysfs_rename_link - rename symlink in object's directory. 184 * sysfs_rename_link - rename symlink in object's directory.
@@ -223,6 +224,7 @@ out:
223 sysfs_put(sd); 224 sysfs_put(sd);
224 return result; 225 return result;
225} 226}
227EXPORT_SYMBOL_GPL(sysfs_rename_link);
226 228
227static int sysfs_get_target_path(struct sysfs_dirent *parent_sd, 229static int sysfs_get_target_path(struct sysfs_dirent *parent_sd,
228 struct sysfs_dirent *target_sd, char *path) 230 struct sysfs_dirent *target_sd, char *path)
@@ -319,8 +321,3 @@ const struct inode_operations sysfs_symlink_inode_operations = {
319 .getattr = sysfs_getattr, 321 .getattr = sysfs_getattr,
320 .permission = sysfs_permission, 322 .permission = sysfs_permission,
321}; 323};
322
323
324EXPORT_SYMBOL_GPL(sysfs_create_link);
325EXPORT_SYMBOL_GPL(sysfs_remove_link);
326EXPORT_SYMBOL_GPL(sysfs_rename_link);