aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sysfs.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-12-11 14:11:53 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-11 18:28:36 -0500
commit324a56e16e44baecac3ca799fd216154145c14bf (patch)
tree4fb43421bfe884cf4e245e3a4672295bae4c7bd9 /include/linux/sysfs.h
parenta8b1c0193602b7ecdeaa7aa8c15c9c3da33244c8 (diff)
kernfs: s/sysfs_dirent/kernfs_node/ and rename its friends accordingly
kernfs has just been separated out from sysfs and we're already in full conflict mode. Nothing can make the situation any worse. Let's take the chance to name things properly. This patch performs the following renames. * s/sysfs_elem_dir/kernfs_elem_dir/ * s/sysfs_elem_symlink/kernfs_elem_symlink/ * s/sysfs_elem_attr/kernfs_elem_file/ * s/sysfs_dirent/kernfs_node/ * s/sd/kn/ in kernfs proper * s/parent_sd/parent/ * s/target_sd/target/ * s/dir_sd/parent/ * s/to_sysfs_dirent()/rb_to_kn()/ * misc renames of local vars when they conflict with the above Because md, mic and gpio dig into sysfs details, this patch ends up modifying them. All are sysfs_dirent renames and trivial. While we can avoid these by introducing a dummy wrapping struct sysfs_dirent around kernfs_node, given the limited usage outside kernfs and sysfs proper, I don't think such workaround is called for. This patch is strictly rename only and doesn't introduce any functional difference. - mic / gpio renames were missing. Spotted by kbuild test robot. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Neil Brown <neilb@suse.de> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Cc: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r--include/linux/sysfs.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index cd8f90bf51a7..30b2ebee6439 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -438,26 +438,26 @@ static inline int sysfs_rename_link(struct kobject *kobj, struct kobject *target
438 return sysfs_rename_link_ns(kobj, target, old_name, new_name, NULL); 438 return sysfs_rename_link_ns(kobj, target, old_name, new_name, NULL);
439} 439}
440 440
441static inline void sysfs_notify_dirent(struct sysfs_dirent *sd) 441static inline void sysfs_notify_dirent(struct kernfs_node *kn)
442{ 442{
443 kernfs_notify(sd); 443 kernfs_notify(kn);
444} 444}
445 445
446static inline struct sysfs_dirent * 446static inline struct kernfs_node *sysfs_get_dirent(struct kernfs_node *parent,
447sysfs_get_dirent(struct sysfs_dirent *parent_sd, const unsigned char *name) 447 const unsigned char *name)
448{ 448{
449 return kernfs_find_and_get(parent_sd, name); 449 return kernfs_find_and_get(parent, name);
450} 450}
451 451
452static inline struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd) 452static inline struct kernfs_node *sysfs_get(struct kernfs_node *kn)
453{ 453{
454 kernfs_get(sd); 454 kernfs_get(kn);
455 return sd; 455 return kn;
456} 456}
457 457
458static inline void sysfs_put(struct sysfs_dirent *sd) 458static inline void sysfs_put(struct kernfs_node *kn)
459{ 459{
460 kernfs_put(sd); 460 kernfs_put(kn);
461} 461}
462 462
463#endif /* _SYSFS_H_ */ 463#endif /* _SYSFS_H_ */