[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Disable watch callbacks only during driver registration instead of all probes.



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.