diff options
-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 @@ | |||
15 | 15 | ||
16 | #include "base.h" | 16 | #include "base.h" |
17 | 17 | ||
18 | static decl_subsys(firmware, NULL); | 18 | static struct kset *firmware_kset; |
19 | 19 | ||
20 | int firmware_register(struct kset *s) | 20 | int 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 | ||
32 | int __init firmware_init(void) | 32 | int __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 | ||
37 | EXPORT_SYMBOL_GPL(firmware_register); | 40 | EXPORT_SYMBOL_GPL(firmware_register); |