ia64/xen-unstable

changeset 11980:a0919d3f7d50

[LINUX] PV-on-HVM: The probe, remove and shutdown methods were added
to struct bus_type in 2.6.16. For older kernels use the methods on the
struct device_driver.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
author Ian Campbell <ian.campbell@xensource.com>
date Wed Oct 25 13:58:30 2006 +0100 (2006-10-25)
parents 8102ccad440d
children 1c985a2e47ea
files linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Wed Oct 25 13:58:30 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Wed Oct 25 13:58:30 2006 +0100
     1.3 @@ -171,9 +171,11 @@ static struct xen_bus_type xenbus_fronte
     1.4  	.bus = {
     1.5  		.name     = "xen",
     1.6  		.match    = xenbus_match,
     1.7 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
     1.8  		.probe    = xenbus_dev_probe,
     1.9  		.remove   = xenbus_dev_remove,
    1.10  		.shutdown = xenbus_dev_shutdown,
    1.11 +#endif
    1.12  	},
    1.13  	.dev = {
    1.14  		.bus_id = "xen",
    1.15 @@ -334,6 +336,11 @@ int xenbus_register_driver_common(struct
    1.16  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
    1.17  	drv->driver.owner = drv->owner;
    1.18  #endif
    1.19 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
    1.20 +	drv->driver.probe = xenbus_dev_probe;
    1.21 +	drv->driver.remove = xenbus_dev_remove;
    1.22 +	drv->driver.shutdown = xenbus_dev_shutdown;
    1.23 +#endif
    1.24  
    1.25  	mutex_lock(&xenwatch_mutex);
    1.26  	ret = driver_register(&drv->driver);