diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-30 05:22:26 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-25 05:40:15 +0100 |
commit | b0d78e5549b44b3d64bf8b3ffe95280025ed102e (patch) | |
tree | ad4104353cfbff99ee5c3b2296f8d7ed64be23f2 /drivers/base/firmware.c | |
parent | kset: convert drivers/base/class.c to use kset_create (diff) | |
download | linux-b0d78e5549b44b3d64bf8b3ffe95280025ed102e.tar.xz linux-b0d78e5549b44b3d64bf8b3ffe95280025ed102e.zip |
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.c | 9 |
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 @@ #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); |