• Tejun Heo's avatar
    sysfs: consolidate sysfs_dirent creation functions · a26cd722
    Tejun Heo authored
    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: default avatarTejun Heo <htejun@gmail.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    a26cd722
file.c 17.2 KB