]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sysfs: consolidate sysfs_dirent creation functions
authorTejun Heo <htejun@gmail.com>
Wed, 13 Jun 2007 18:45:14 +0000 (03:45 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 11 Jul 2007 23:09:04 +0000 (16:09 -0700)
commita26cd7226c24c3be5dd5f48a74832fe64beb8489
tree0dfb4a15d800494a06a4ddf83c4d33812c404fac
parent996b73764e9bb9d5e751fd15b130ba38637d66a8
sysfs: consolidate sysfs_dirent creation functions

Currently there are four functions to create sysfs_dirent -
__sysfs_new_dirent(), sysfs_new_dirent(), __sysfs_make_dirent() and
sysfs_make_dirent().  Other than sysfs_make_dirent(), no function has
two users if calls to implement other functions are excluded.

This patch consolidates sysfs_dirent creation functions into the
following two.

* sysfs_new_dirent() : allocate and initialize
* sysfs_attach_dirent() : attach to sysfs_dirent hierarchy and/or
  associate with dentry

This simplifies interface and gives callers more flexibility.  This is
in preparation of object reference simplification.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/dir.c
fs/sysfs/file.c
fs/sysfs/symlink.c
fs/sysfs/sysfs.h