summaryrefslogtreecommitdiff
path: root/drivers/base/hypervisor.c
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@de.ibm.com>2006-05-09 14:53:49 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 23:40:48 +0400
commit4039483fd3065920f035eed39ec59085421c0a4f (patch)
treefc89410a8cd031c3f71a7319987fa6fc9b09336c /drivers/base/hypervisor.c
parente391553222211e07dfbe2f01c413b4e6d0ae32aa (diff)
downloadlinux-4039483fd3065920f035eed39ec59085421c0a4f.tar.xz
[PATCH] Driver Core: Add /sys/hypervisor when needed
To have a home for all hypervisors, this patch creates /sys/hypervisor. A new config option SYS_HYPERVISOR is introduced, which should to be set by architecture dependent hypervisors (e.g. s390 or Xen). Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/hypervisor.c')
-rw-r--r--drivers/base/hypervisor.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/base/hypervisor.c b/drivers/base/hypervisor.c
new file mode 100644
index 000000000000..0c85e9d6a448
--- /dev/null
+++ b/drivers/base/hypervisor.c
@@ -0,0 +1,19 @@
+/*
+ * hypervisor.c - /sys/hypervisor subsystem.
+ *
+ * This file is released under the GPLv2
+ *
+ */
+
+#include <linux/kobject.h>
+#include <linux/device.h>
+
+#include "base.h"
+
+decl_subsys(hypervisor, NULL, NULL);
+EXPORT_SYMBOL_GPL(hypervisor_subsys);
+
+int __init hypervisor_init(void)
+{
+ return subsystem_register(&hypervisor_subsys);
+}