lkml.org 
[lkml]   [2007]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 07/54] kset: convert debugfs to use kset_create
    Date
    Dynamically create the kset instead of declaring it statically.

    Cc: Kay Sievers <kay.sievers@vrfy.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
    ---
    fs/debugfs/inode.c | 14 +++++++-------
    1 files changed, 7 insertions(+), 7 deletions(-)

    diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
    index f7f1351..9f8af79 100644
    --- a/fs/debugfs/inode.c
    +++ b/fs/debugfs/inode.c
    @@ -426,20 +426,20 @@ exit:
    }
    EXPORT_SYMBOL_GPL(debugfs_rename);

    -static decl_subsys(debug, NULL);
    +static struct kset *debug_kset;

    static int __init debugfs_init(void)
    {
    int retval;

    - debug_subsys.kobj.kset = &kernel_subsys;
    - retval = subsystem_register(&debug_subsys);
    - if (retval)
    - return retval;
    + debug_kset = kset_create_and_register("debug", NULL,
    + NULL, &kernel_subsys);
    + if (IS_ERR(debug_kset))
    + return PTR_ERR(debug_kset);

    retval = register_filesystem(&debug_fs_type);
    if (retval)
    - subsystem_unregister(&debug_subsys);
    + kset_unregister(debug_kset);
    return retval;
    }

    @@ -447,7 +447,7 @@ static void __exit debugfs_exit(void)
    {
    simple_release_fs(&debugfs_mount, &debugfs_mount_count);
    unregister_filesystem(&debug_fs_type);
    - subsystem_unregister(&debug_subsys);
    + kset_unregister(debug_kset);
    }

    core_initcall(debugfs_init);
    --
    1.5.3.4
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-11-03 01:05    [W:4.080 / U:0.472 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site