ia64/xen-unstable
changeset 7372:d6e0eb8622cd
Disable watch callbacks only during driver registration instead of all probes.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author | cl349@firebug.cl.cam.ac.uk |
---|---|
date | Wed Oct 12 20:58:51 2005 +0100 (2005-10-12) |
parents | 179027128d99 |
children | 40b4860f554a |
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 12 18:43:26 2005 +0100 1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c Wed Oct 12 20:58:51 2005 +0100 1.3 @@ -207,7 +207,6 @@ static int xenbus_dev_probe(struct devic 1.4 struct xenbus_device *dev = to_xenbus_device(_dev); 1.5 struct xenbus_driver *drv = to_xenbus_driver(_dev->driver); 1.6 const struct xenbus_device_id *id; 1.7 - int ret; 1.8 1.9 if (!drv->probe) 1.10 return -ENODEV; 1.11 @@ -216,10 +215,7 @@ static int xenbus_dev_probe(struct devic 1.12 if (!id) 1.13 return -ENODEV; 1.14 1.15 - down(&xenwatch_mutex); 1.16 - ret = drv->probe(dev, id); 1.17 - up(&xenwatch_mutex); 1.18 - return ret; 1.19 + return drv->probe(dev, id); 1.20 } 1.21 1.22 static int xenbus_dev_remove(struct device *_dev) 1.23 @@ -235,13 +231,18 @@ static int xenbus_dev_remove(struct devi 1.24 static int xenbus_register_driver_common(struct xenbus_driver *drv, 1.25 struct xen_bus_type *bus) 1.26 { 1.27 + int ret; 1.28 + 1.29 drv->driver.name = drv->name; 1.30 drv->driver.bus = &bus->bus; 1.31 drv->driver.owner = drv->owner; 1.32 drv->driver.probe = xenbus_dev_probe; 1.33 drv->driver.remove = xenbus_dev_remove; 1.34 1.35 - return driver_register(&drv->driver); 1.36 + down(&xenwatch_mutex); 1.37 + ret = driver_register(&drv->driver); 1.38 + up(&xenwatch_mutex); 1.39 + return ret; 1.40 } 1.41 1.42 int xenbus_register_driver(struct xenbus_driver *drv)