Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=443dbf9007854ef2892226615e23b60a35b89697
Commit:     443dbf9007854ef2892226615e23b60a35b89697
Parent:     59a548338ac6c9d7549c54278d0f724088585928
Author:     Greg Kroah-Hartman <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 29 23:22:26 2007 -0500
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Jan 24 20:40:15 2008 -0800

    kset: convert drivers/base/class.c to use kset_create
    
    Dynamically create the kset instead of declaring it statically.
    
    The class_obj subsystem is not yet converted as it is more complex and
    should be going away soon with the removal of class_device from the
    kernel tree.
    
    Cc: Kay Sievers <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/class.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/base/class.c b/drivers/base/class.c
index 8ad9892..d8a92c6 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -71,7 +71,7 @@ static struct kobj_type class_ktype = {
 };
 
 /* Hotplug events for classes go to the class_obj subsys */
-static decl_subsys(class, NULL);
+static struct kset *class_kset;
 
 
 int class_create_file(struct class * cls, const struct class_attribute * attr)
@@ -149,7 +149,7 @@ int class_register(struct class * cls)
        if (error)
                return error;
 
-       cls->subsys.kobj.kset = &class_subsys;
+       cls->subsys.kobj.kset = class_kset;
        cls->subsys.kobj.ktype = &class_ktype;
 
        error = subsystem_register(&cls->subsys);
@@ -855,11 +855,9 @@ void class_interface_unregister(struct class_interface 
*class_intf)
 
 int __init classes_init(void)
 {
-       int retval;
-
-       retval = subsystem_register(&class_subsys);
-       if (retval)
-               return retval;
+       class_kset = kset_create_and_add("class", NULL, NULL);
+       if (!class_kset)
+               return -ENOMEM;
 
        /* ick, this is ugly, the things we go through to keep from showing up
         * in sysfs... */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to