aboutsummaryrefslogtreecommitdiffstats
path: root/patches/linux-2.6.16.30/device_bind.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/linux-2.6.16.30/device_bind.patch')
-rw-r--r--patches/linux-2.6.16.30/device_bind.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/patches/linux-2.6.16.30/device_bind.patch b/patches/linux-2.6.16.30/device_bind.patch
new file mode 100644
index 0000000000..8cef71ecc1
--- /dev/null
+++ b/patches/linux-2.6.16.30/device_bind.patch
@@ -0,0 +1,15 @@
+diff -pruN ../orig-linux-2.6.16.29/drivers/base/bus.c ./drivers/base/bus.c
+--- ../orig-linux-2.6.16.29/drivers/base/bus.c 2006-09-12 19:02:10.000000000 +0100
++++ ./drivers/base/bus.c 2006-09-19 13:58:54.000000000 +0100
+@@ -188,6 +188,11 @@ static ssize_t driver_bind(struct device
+ up(&dev->sem);
+ if (dev->parent)
+ up(&dev->parent->sem);
++
++ if (err > 0) /* success */
++ err = count;
++ else if (err == 0) /* driver didn't accept device */
++ err = -ENODEV;
+ }
+ put_device(dev);
+ put_bus(bus);