]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
xen sysfs: Utilize SYS_HYPERVISOR config option
authorkfraser <kfraser@localhost.localdomain>
Wed, 20 Jun 2007 13:39:34 +0000 (14:39 +0100)
committerkfraser <kfraser@localhost.localdomain>
Wed, 20 Jun 2007 13:39:34 +0000 (14:39 +0100)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
drivers/xen/Kconfig
drivers/xen/core/Makefile
drivers/xen/core/hypervisor_sysfs.c
include/xen/hypervisor_sysfs.h

index 7b1974e4412e7f98e2845c9a9ee580ea05fe6ba4..903b2a3ce59cc193ef84e175ae1728b2ae3af563 100644 (file)
@@ -232,6 +232,7 @@ config XEN_DISABLE_SERIAL
 config XEN_SYSFS
        tristate "Export Xen attributes in sysfs"
        depends on SYSFS
+       select SYS_HYPERVISOR
        default y
        help
          Xen hypervisor attributes will show up under /sys/hypervisor/.
index 95122cbf463a0866d003f293decdced2e3116ad1..d5435af71f6e19ed20fc7e14073eba2a33bc4c1a 100644 (file)
@@ -5,7 +5,7 @@
 obj-y := evtchn.o gnttab.o features.o reboot.o machine_reboot.o
 
 obj-$(CONFIG_PROC_FS)          += xen_proc.o
-obj-$(CONFIG_SYSFS)            += hypervisor_sysfs.o
+obj-$(CONFIG_SYS_HYPERVISOR)   += hypervisor_sysfs.o
 obj-$(CONFIG_HOTPLUG_CPU)      += cpu_hotplug.o
 obj-$(CONFIG_XEN_SYSFS)                += xen_sysfs.o
 obj-$(CONFIG_XEN_SMPBOOT)      += smpboot.o
index ab3ce04d8e1fece090966aeea82ef44656946c1a..fe2c4c2fa1fff934ddb785d3c259c307a4d67a3a 100644 (file)
@@ -12,8 +12,6 @@
 #include <linux/kobject.h>
 #include <xen/hypervisor_sysfs.h>
 
-decl_subsys(hypervisor, NULL, NULL);
-
 static ssize_t hyp_sysfs_show(struct kobject *kobj,
                              struct attribute *attr,
                              char *buffer)
@@ -37,7 +35,7 @@ static ssize_t hyp_sysfs_store(struct kobject *kobj,
        return 0;
 }
 
-struct sysfs_ops hyp_sysfs_ops = {
+static struct sysfs_ops hyp_sysfs_ops = {
        .show = hyp_sysfs_show,
        .store = hyp_sysfs_store,
 };
@@ -52,8 +50,7 @@ static int __init hypervisor_subsys_init(void)
                return -ENODEV;
 
        hypervisor_subsys.kset.kobj.ktype = &hyp_sysfs_kobj_type;
-       return subsystem_register(&hypervisor_subsys);
+       return 0;
 }
 
 device_initcall(hypervisor_subsys_init);
-EXPORT_SYMBOL_GPL(hypervisor_subsys);
index 706fb7f79a3011de1e6b5f84796cad460a027b83..fed48a1c400828d7345895de578d94e77a39a5da 100644 (file)
@@ -20,8 +20,6 @@ static struct hyp_sysfs_attr  _name##_attr = __ATTR_RO(_name)
 static struct hyp_sysfs_attr _name##_attr = \
        __ATTR(_name, 0644, _name##_show, _name##_store)
 
-extern struct subsystem hypervisor_subsys;
-
 struct hyp_sysfs_attr {
        struct attribute attr;
        ssize_t (*show)(struct hyp_sysfs_attr *, char *);