From: kfraser@localhost.localdomain Date: Thu, 17 Aug 2006 15:28:47 +0000 (+0100) Subject: [LINUX] Allow xenbus to be built as a module. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15710^2~61 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a03d12d189248dbecefced0006d23d52eafb7a5a;p=xen.git [LINUX] Allow xenbus to be built as a module. Signed-off-by: Steven Smith --- diff --git a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c index 6e30040779..bbe4a8c5a8 100644 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c @@ -346,7 +346,7 @@ static struct file_operations xenbus_dev_file_ops = { .poll = xenbus_dev_poll, }; -static int __init +int __init xenbus_dev_init(void) { xenbus_dev_intf = create_xen_proc_entry("xenbus", 0400); @@ -355,5 +355,3 @@ xenbus_dev_init(void) return 0; } - -__initcall(xenbus_dev_init); diff --git a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c index 2d42be1599..9668d6d7ae 100644 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c @@ -1023,6 +1023,8 @@ static int __init xenbus_probe_init(void) xen_store_interface = mfn_to_virt(xen_store_mfn); + xenbus_dev_init(); + /* Initialize the interface to xenstore. */ err = xs_init(); if (err) { @@ -1055,6 +1057,8 @@ static int __init xenbus_probe_init(void) postcore_initcall(xenbus_probe_init); +MODULE_LICENSE("Dual BSD/GPL"); + static int is_disconnected_device(struct device *dev, void *data) { @@ -1138,6 +1142,7 @@ static void wait_for_devices(struct xenbus_driver *xendrv) print_device_status); } +#ifndef MODULE static int __init boot_wait_for_devices(void) { ready_to_wait_for_devices = 1; @@ -1146,3 +1151,4 @@ static int __init boot_wait_for_devices(void) } late_initcall(boot_wait_for_devices); +#endif diff --git a/linux-2.6-xen-sparse/include/xen/xenbus.h b/linux-2.6-xen-sparse/include/xen/xenbus.h index f65dc9b972..af36ef614b 100644 --- a/linux-2.6-xen-sparse/include/xen/xenbus.h +++ b/linux-2.6-xen-sparse/include/xen/xenbus.h @@ -295,5 +295,6 @@ void xenbus_dev_error(struct xenbus_device *dev, int err, const char *fmt, void xenbus_dev_fatal(struct xenbus_device *dev, int err, const char *fmt, ...); +int __init xenbus_dev_init(void); #endif /* _XEN_XENBUS_H */