--- linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c 2007-05-14 13:45:04.000000000 -0400 +++ linux-2.6-xen-sparse-new/drivers/xen/xenbus/xenbus_probe.c 2007-05-15 10:55:31.000000000 -0400 @@ -67,8 +67,11 @@ static unsigned long xen_store_mfn; extern struct mutex xenwatch_mutex; - +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) +static struct notifier_block *xenstore_chain; +#else static ATOMIC_NOTIFIER_HEAD(xenstore_chain); +#endif static void wait_for_devices(struct xenbus_driver *xendrv); @@ -796,7 +799,11 @@ if (xenstored_ready > 0) ret = nb->notifier_call(nb, 0, NULL); else +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) + notifier_chain_register(&xenstore_chain, nb); +#else atomic_notifier_chain_register(&xenstore_chain, nb); +#endif return ret; } @@ -804,7 +811,11 @@ void unregister_xenstore_notifier(struct notifier_block *nb) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) + notifier_chain_unregister(&xenstore_chain, nb); +#else atomic_notifier_chain_unregister(&xenstore_chain, nb); +#endif } EXPORT_SYMBOL_GPL(unregister_xenstore_notifier); @@ -819,7 +830,11 @@ xenbus_backend_probe_and_watch(); /* Notify others that xenstore is up */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) + notifier_call_chain(&xenstore_chain, 0, NULL); +#else atomic_notifier_call_chain(&xenstore_chain, 0, NULL); +#endif }