aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/s390/hypfs/inode.c2
-rw-r--r--drivers/base/hypervisor.c12
-rw-r--r--include/linux/kobject.h4
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
14decl_subsys(hypervisor, NULL); 15struct kobject *hypervisor_kobj;
15EXPORT_SYMBOL_GPL(hypervisor_subsys); 16EXPORT_SYMBOL_GPL(hypervisor_kobj);
16 17
17int __init hypervisor_init(void) 18int __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 */
198extern struct kset *kernel_kset; 198extern struct kset *kernel_kset;
199/* The global /sys/hypervisor/ subsystem */ 199/* The global /sys/hypervisor/ kobject for people to chain off of */
200extern struct kset hypervisor_subsys; 200extern struct kobject *hypervisor_kobj;
201 201
202extern int __must_check subsystem_register(struct kset *); 202extern int __must_check subsystem_register(struct kset *);
203extern void subsystem_unregister(struct kset *); 203extern void subsystem_unregister(struct kset *);