aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/firmware.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-10-30 00:22:26 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:15 -0500
commitb0d78e5549b44b3d64bf8b3ffe95280025ed102e (patch)
treead4104353cfbff99ee5c3b2296f8d7ed64be23f2 /drivers/base/firmware.c
parent443dbf9007854ef2892226615e23b60a35b89697 (diff)
kset: convert drivers/base/firmware.c to use kset_create
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>
Diffstat (limited to 'drivers/base/firmware.c')
-rw-r--r--drivers/base/firmware.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/base/firmware.c b/drivers/base/firmware.c
index 336be0450d54..6a4e494042f6 100644
--- a/drivers/base/firmware.c
+++ b/drivers/base/firmware.c
@@ -15,11 +15,11 @@
15 15
16#include "base.h" 16#include "base.h"
17 17
18static decl_subsys(firmware, NULL); 18static struct kset *firmware_kset;
19 19
20int firmware_register(struct kset *s) 20int firmware_register(struct kset *s)
21{ 21{
22 s->kobj.kset = &firmware_subsys; 22 s->kobj.kset = firmware_kset;
23 s->kobj.ktype = NULL; 23 s->kobj.ktype = NULL;
24 return subsystem_register(s); 24 return subsystem_register(s);
25} 25}
@@ -31,7 +31,10 @@ void firmware_unregister(struct kset *s)
31 31
32int __init firmware_init(void) 32int __init firmware_init(void)
33{ 33{
34 return subsystem_register(&firmware_subsys); 34 firmware_kset = kset_create_and_add("firmware", NULL, NULL);
35 if (!firmware_kset)
36 return -ENOMEM;
37 return 0;
35} 38}
36 39
37EXPORT_SYMBOL_GPL(firmware_register); 40EXPORT_SYMBOL_GPL(firmware_register);