From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ky Srinivasan" Subject: [PATCH] PV driver compatibility patch Date: Tue, 15 May 2007 11:05:32 -0600 Message-ID: <46499FCB.E57C.0030.0@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartC3E4C14C.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --=__PartC3E4C14C.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline This patch fixes compilation issues on 2.6.16 kernels. Signed-off-by: K. Y. Srinivasan --=__PartC3E4C14C.0__= Content-Type: text/plain; name="xenbus_compat.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="xenbus_compat.patch" --- 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; =20 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 =20 static void wait_for_devices(struct xenbus_driver *xendrv); =20 @@ -796,7 +799,11 @@ if (xenstored_ready > 0) ret =3D 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 =20 return ret; } @@ -804,7 +811,11 @@ =20 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); =20 @@ -819,7 +830,11 @@ xenbus_backend_probe_and_watch(); =20 /* 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 } =20 =20 --=__PartC3E4C14C.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__PartC3E4C14C.0__=--