[LINUX] Fix dependencies on CONFIG_PROC_FS.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 17 Jun 2006 07:56:02 +0000 (08:56 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 17 Jun 2006 07:56:02 +0000 (08:56 +0100)
Signed-off-by: Horms <horms@verge.net.au>
linux-2.6-xen-sparse/drivers/xen/Kconfig
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
linux-2.6-xen-sparse/drivers/xen/privcmd/Makefile
linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c

index dde5ca154dc9dec49378ea2f521f7552ad26a31a..6124dda0f090ab5a72fe07e97d08343394e33d40 100644 (file)
@@ -28,6 +28,11 @@ config XEN_UNPRIVILEGED_GUEST
        bool
        default !XEN_PRIVILEGED_GUEST
 
+config XEN_PRIVCMD
+       bool
+       depends on PROC_FS
+       default y
+
 config XEN_BACKEND
         tristate "Backend driver support"
         default y
@@ -84,6 +89,11 @@ config XEN_BLKDEV_BACKEND
          block devices to other guests via a high-performance shared-memory
          interface.
 
+config XEN_XENBUS_DEV
+       bool
+       depends on PROC_FS
+       default y
+
 config XEN_NETDEV_BACKEND
        tristate "Network-device backend driver"
         depends on XEN_BACKEND && NET
index da1a7eca1ca6935c47dca1b62e025433fe73a950..b8aca267781e31aea4ae162d5f9ae3f41f4d57f1 100644 (file)
@@ -58,7 +58,9 @@
 
 #define PAGES2KB(_p) ((_p)<<(PAGE_SHIFT-10))
 
+#ifdef CONFIG_PROC_FS
 static struct proc_dir_entry *balloon_pde;
+#endif
 
 static DECLARE_MUTEX(balloon_mutex);
 
@@ -403,6 +405,7 @@ static int balloon_init_watcher(struct notifier_block *notifier,
        return NOTIFY_DONE;
 }
 
+#ifdef CONFIG_PROC_FS
 static int balloon_write(struct file *file, const char __user *buffer,
                         unsigned long count, void *data)
 {
@@ -456,6 +459,7 @@ static int balloon_read(char *page, char **start, off_t off,
        *eof = 1;
        return len;
 }
+#endif
 
 static struct notifier_block xenstore_notifier;
 
@@ -481,6 +485,7 @@ static int __init balloon_init(void)
        balloon_timer.data = 0;
        balloon_timer.function = balloon_alarm;
     
+#ifdef CONFIG_PROC_FS
        if ((balloon_pde = create_xen_proc_entry("balloon", 0644)) == NULL) {
                WPRINTK("Unable to create /proc/xen/balloon.\n");
                return -1;
@@ -488,6 +493,7 @@ static int __init balloon_init(void)
 
        balloon_pde->read_proc  = balloon_read;
        balloon_pde->write_proc = balloon_write;
+#endif
     
        /* Initialise the balloon with excess memory space. */
        for (pfn = xen_start_info->nr_pages; pfn < max_pfn; pfn++) {
index e21869553c7f7a352169a741a4d7450c9852043e..de090ba6bef5971572ba5eca1f1ebf8f88ed83c3 100644 (file)
@@ -1,2 +1,2 @@
 
-obj-y  := privcmd.o
+obj-$(CONFIG_XEN_PRIVCMD)      := privcmd.o
index 899cc3133db1e6963d38651b42f2aa597f37fd4b..d7c7d0517268ee13a900335d6c4d893a2603119a 100644 (file)
@@ -9,4 +9,4 @@ xenbus-objs += xenbus_client.o
 xenbus-objs += xenbus_comms.o
 xenbus-objs += xenbus_xs.o
 xenbus-objs += xenbus_probe.o
-xenbus-objs += xenbus_dev.o
+obj-$(CONFIG_XEN_XENBUS_DEV) += xenbus_dev.o
index 137529b79b2aaa7d5fa69791901f7a9fc702d754..454f1a1eee29ffad61c43576a360d76728fdfec6 100644 (file)
@@ -926,6 +926,7 @@ void xenbus_probe(void *unused)
 }
 
 
+#ifdef CONFIG_PROC_FS
 static struct file_operations xsd_kva_fops;
 static struct proc_dir_entry *xsd_kva_intf;
 static struct proc_dir_entry *xsd_port_intf;
@@ -964,6 +965,7 @@ static int xsd_port_read(char *page, char **start, off_t off,
        *eof = 1;
        return len;
 }
+#endif
 
 
 static int __init xenbus_probe_init(void)
@@ -1008,6 +1010,7 @@ static int __init xenbus_probe_init(void)
                BUG_ON(err);
                xen_start_info->store_evtchn = alloc_unbound.port;
 
+#ifdef CONFIG_PROC_FS
                /* And finally publish the above info in /proc/xen */
                xsd_kva_intf = create_xen_proc_entry("xsd_kva", 0600);
                if (xsd_kva_intf) {
@@ -1020,6 +1023,7 @@ static int __init xenbus_probe_init(void)
                xsd_port_intf = create_xen_proc_entry("xsd_port", 0400);
                if (xsd_port_intf)
                        xsd_port_intf->read_proc = xsd_port_read;
+#endif
        } else
                xenstored_ready = 1;