WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Disable watch callbacks only during driver registration

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Disable watch callbacks only during driver registration instead of all probes.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 13 Oct 2005 12:30:15 +0000
Delivery-date: Thu, 13 Oct 2005 12:28:17 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID d6e0eb8622cdd514a1f15e23dccac979cd611d18
# Parent  179027128d998992b8e4c5b6e393cdd146f5dd18
Disable watch callbacks only during driver registration instead of all probes.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 179027128d99 -r d6e0eb8622cd 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Wed Oct 12 
17:43:26 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Wed Oct 12 
19:58:51 2005
@@ -207,7 +207,6 @@
        struct xenbus_device *dev = to_xenbus_device(_dev);
        struct xenbus_driver *drv = to_xenbus_driver(_dev->driver);
        const struct xenbus_device_id *id;
-       int ret;
 
        if (!drv->probe)
                return -ENODEV;
@@ -216,10 +215,7 @@
        if (!id)
                return -ENODEV;
 
-       down(&xenwatch_mutex);
-       ret = drv->probe(dev, id);
-       up(&xenwatch_mutex);
-       return ret;
+       return drv->probe(dev, id);
 }
 
 static int xenbus_dev_remove(struct device *_dev)
@@ -235,13 +231,18 @@
 static int xenbus_register_driver_common(struct xenbus_driver *drv,
                                         struct xen_bus_type *bus)
 {
+       int ret;
+
        drv->driver.name = drv->name;
        drv->driver.bus = &bus->bus;
        drv->driver.owner = drv->owner;
        drv->driver.probe = xenbus_dev_probe;
        drv->driver.remove = xenbus_dev_remove;
 
-       return driver_register(&drv->driver);
+       down(&xenwatch_mutex);
+       ret = driver_register(&drv->driver);
+       up(&xenwatch_mutex);
+       return ret;
 }
 
 int xenbus_register_driver(struct xenbus_driver *drv)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Disable watch callbacks only during driver registration instead of all probes., Xen patchbot -unstable <=