ia64/xen-unstable

changeset 9419:2c77d26871f7

Fix a Linux bug in the driver core in regards to the bind sysfs driver
attribute. I've submitted this to lkml, but it should be included in
Xen now for people who will use the pciback late binding capability.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
author kaf24@firebug.cl.cam.ac.uk
date Thu Mar 23 10:58:39 2006 +0100 (2006-03-23)
parents 05daa762a8e2
children 0c6534a2e396 5c9c44fc1c39
files patches/linux-2.6.16/device_bind.patch
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/linux-2.6.16/device_bind.patch	Thu Mar 23 10:58:39 2006 +0100
     1.3 @@ -0,0 +1,14 @@
     1.4 +--- linux-2.6.16/drivers/base/bus.c	2006-03-16 10:50:20.000000000 -0500
     1.5 ++++ linux-2.6.16/drivers/base/bus.c	2006-03-16 11:02:08.000000000 -0500
     1.6 +@@ -188,6 +188,11 @@ static ssize_t driver_bind(struct device
     1.7 + 		up(&dev->sem);
     1.8 + 		if (dev->parent)
     1.9 + 			up(&dev->parent->sem);
    1.10 ++
    1.11 ++		if (err > 0) 		/* success */
    1.12 ++			err = count;
    1.13 ++		else if (err == 0)	/* driver didn't accept device */
    1.14 ++			err = -ENODEV;
    1.15 + 	}
    1.16 + 	put_device(dev);
    1.17 + 	put_bus(bus);