]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
kset: convert drivers/base/firmware.c to use kset_create
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 30 Oct 2007 04:22:26 +0000 (23:22 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Jan 2008 04:40:15 +0000 (20:40 -0800)
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>
drivers/base/firmware.c

index 336be0450d54943e662c967ec1a2b0b515f8f0d6..6a4e494042f6269aacf51baa31fe1a5a25858080 100644 (file)
 
 #include "base.h"
 
-static decl_subsys(firmware, NULL);
+static struct kset *firmware_kset;
 
 int firmware_register(struct kset *s)
 {
-       s->kobj.kset = &firmware_subsys;
+       s->kobj.kset = firmware_kset;
        s->kobj.ktype = NULL;
        return subsystem_register(s);
 }
@@ -31,7 +31,10 @@ void firmware_unregister(struct kset *s)
 
 int __init firmware_init(void)
 {
-       return subsystem_register(&firmware_subsys);
+       firmware_kset = kset_create_and_add("firmware", NULL, NULL);
+       if (!firmware_kset)
+               return -ENOMEM;
+       return 0;
 }
 
 EXPORT_SYMBOL_GPL(firmware_register);