diff options
-rw-r--r-- | arch/s390/hypfs/inode.c | 2 | ||||
-rw-r--r-- | drivers/base/hypervisor.c | 12 | ||||
-rw-r--r-- | include/linux/kobject.h | 4 |
3 files changed, 11 insertions, 7 deletions
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index c022ccc04d41..b0ad479e7487 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c | |||
@@ -506,7 +506,7 @@ static int __init hypfs_init(void) | |||
506 | goto fail_diag; | 506 | goto fail_diag; |
507 | } | 507 | } |
508 | } | 508 | } |
509 | s390_subsys.kobj.kset = &hypervisor_subsys; | 509 | s390_subsys.kobj.parent = hypervisor_kobj; |
510 | rc = subsystem_register(&s390_subsys); | 510 | rc = subsystem_register(&s390_subsys); |
511 | if (rc) | 511 | if (rc) |
512 | goto fail_sysfs; | 512 | goto fail_sysfs; |
diff --git a/drivers/base/hypervisor.c b/drivers/base/hypervisor.c index 14e75e9ec783..6428cba3aadd 100644 --- a/drivers/base/hypervisor.c +++ b/drivers/base/hypervisor.c | |||
@@ -2,19 +2,23 @@ | |||
2 | * hypervisor.c - /sys/hypervisor subsystem. | 2 | * hypervisor.c - /sys/hypervisor subsystem. |
3 | * | 3 | * |
4 | * Copyright (C) IBM Corp. 2006 | 4 | * Copyright (C) IBM Corp. 2006 |
5 | * Copyright (C) 2007 Greg Kroah-Hartman <gregkh@suse.de> | ||
6 | * Copyright (C) 2007 Novell Inc. | ||
5 | * | 7 | * |
6 | * This file is released under the GPLv2 | 8 | * This file is released under the GPLv2 |
7 | */ | 9 | */ |
8 | 10 | ||
9 | #include <linux/kobject.h> | 11 | #include <linux/kobject.h> |
10 | #include <linux/device.h> | 12 | #include <linux/device.h> |
11 | |||
12 | #include "base.h" | 13 | #include "base.h" |
13 | 14 | ||
14 | decl_subsys(hypervisor, NULL); | 15 | struct kobject *hypervisor_kobj; |
15 | EXPORT_SYMBOL_GPL(hypervisor_subsys); | 16 | EXPORT_SYMBOL_GPL(hypervisor_kobj); |
16 | 17 | ||
17 | int __init hypervisor_init(void) | 18 | int __init hypervisor_init(void) |
18 | { | 19 | { |
19 | return subsystem_register(&hypervisor_subsys); | 20 | hypervisor_kobj = kobject_create_and_add("hypervisor", NULL); |
21 | if (!hypervisor_kobj) | ||
22 | return -ENOMEM; | ||
23 | return 0; | ||
20 | } | 24 | } |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index bd741e86c11e..f2483f6fd639 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -196,8 +196,8 @@ struct kset _name##_subsys = { \ | |||
196 | 196 | ||
197 | /* The global /sys/kernel/ kset for people to chain off of */ | 197 | /* The global /sys/kernel/ kset for people to chain off of */ |
198 | extern struct kset *kernel_kset; | 198 | extern struct kset *kernel_kset; |
199 | /* The global /sys/hypervisor/ subsystem */ | 199 | /* The global /sys/hypervisor/ kobject for people to chain off of */ |
200 | extern struct kset hypervisor_subsys; | 200 | extern struct kobject *hypervisor_kobj; |
201 | 201 | ||
202 | extern int __must_check subsystem_register(struct kset *); | 202 | extern int __must_check subsystem_register(struct kset *); |
203 | extern void subsystem_unregister(struct kset *); | 203 | extern void subsystem_unregister(struct kset *); |