ia64/xen-unstable

changeset 11190:487fe5006064

[LINUX] Allow xenbus to be built as a module.
Signed-off-by: Steven Smith <ssmith@xensource.com>
author kfraser@localhost.localdomain
date Thu Aug 17 16:28:47 2006 +0100 (2006-08-17)
parents 45f3c127069d
children 2d734ac9ec85
files linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c linux-2.6-xen-sparse/include/xen/xenbus.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c	Thu Aug 17 16:22:08 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c	Thu Aug 17 16:28:47 2006 +0100
     1.3 @@ -346,7 +346,7 @@ static struct file_operations xenbus_dev
     1.4  	.poll = xenbus_dev_poll,
     1.5  };
     1.6  
     1.7 -static int __init
     1.8 +int __init
     1.9  xenbus_dev_init(void)
    1.10  {
    1.11  	xenbus_dev_intf = create_xen_proc_entry("xenbus", 0400);
    1.12 @@ -355,5 +355,3 @@ xenbus_dev_init(void)
    1.13  
    1.14  	return 0;
    1.15  }
    1.16 -
    1.17 -__initcall(xenbus_dev_init);
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Thu Aug 17 16:22:08 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Thu Aug 17 16:28:47 2006 +0100
     2.3 @@ -1023,6 +1023,8 @@ static int __init xenbus_probe_init(void
     2.4  
     2.5  	xen_store_interface = mfn_to_virt(xen_store_mfn);
     2.6  
     2.7 +	xenbus_dev_init();
     2.8 +
     2.9  	/* Initialize the interface to xenstore. */
    2.10  	err = xs_init();
    2.11  	if (err) {
    2.12 @@ -1055,6 +1057,8 @@ static int __init xenbus_probe_init(void
    2.13  
    2.14  postcore_initcall(xenbus_probe_init);
    2.15  
    2.16 +MODULE_LICENSE("Dual BSD/GPL");
    2.17 +
    2.18  
    2.19  static int is_disconnected_device(struct device *dev, void *data)
    2.20  {
    2.21 @@ -1138,6 +1142,7 @@ static void wait_for_devices(struct xenb
    2.22  			 print_device_status);
    2.23  }
    2.24  
    2.25 +#ifndef MODULE
    2.26  static int __init boot_wait_for_devices(void)
    2.27  {
    2.28  	ready_to_wait_for_devices = 1;
    2.29 @@ -1146,3 +1151,4 @@ static int __init boot_wait_for_devices(
    2.30  }
    2.31  
    2.32  late_initcall(boot_wait_for_devices);
    2.33 +#endif
     3.1 --- a/linux-2.6-xen-sparse/include/xen/xenbus.h	Thu Aug 17 16:22:08 2006 +0100
     3.2 +++ b/linux-2.6-xen-sparse/include/xen/xenbus.h	Thu Aug 17 16:28:47 2006 +0100
     3.3 @@ -295,5 +295,6 @@ void xenbus_dev_error(struct xenbus_devi
     3.4  void xenbus_dev_fatal(struct xenbus_device *dev, int err, const char *fmt,
     3.5  		      ...);
     3.6  
     3.7 +int __init xenbus_dev_init(void);
     3.8  
     3.9  #endif /* _XEN_XENBUS_H */