diff options
author | Steve French <sfrench@us.ibm.com> | 2005-09-07 00:47:31 +0200 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-09-07 00:47:31 +0200 |
commit | c08319a9d50b5c9cb4fdb33728bd16497cf4ddd3 (patch) | |
tree | 5fbec9030029da1ec387c18b85f26f19ee50da44 /drivers/base/bus.c | |
parent | [CIFS] Add support for legacy servers part 5 (diff) | |
parent | Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6 (diff) | |
download | linux-c08319a9d50b5c9cb4fdb33728bd16497cf4ddd3.tar.xz linux-c08319a9d50b5c9cb4fdb33728bd16497cf4ddd3.zip |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r-- | drivers/base/bus.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index ab53832d57e5..17e96698410e 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -156,7 +156,9 @@ static ssize_t driver_unbind(struct device_driver *drv, device_release_driver(dev); err = count; } - return err; + if (err) + return err; + return count; } static DRIVER_ATTR(unbind, S_IWUSR, NULL, driver_unbind); @@ -358,7 +360,7 @@ int bus_add_device(struct device * dev) if (bus) { pr_debug("bus %s: add device %s\n", bus->name, dev->bus_id); device_attach(dev); - klist_add_tail(&bus->klist_devices, &dev->knode_bus); + klist_add_tail(&dev->knode_bus, &bus->klist_devices); error = device_add_attrs(bus, dev); if (!error) { sysfs_create_link(&bus->devices.kobj, &dev->kobj, dev->bus_id); @@ -446,7 +448,7 @@ int bus_add_driver(struct device_driver * drv) } driver_attach(drv); - klist_add_tail(&bus->klist_drivers, &drv->knode_bus); + klist_add_tail(&drv->knode_bus, &bus->klist_drivers); module_add_driver(drv->owner, drv); driver_add_attrs(bus, drv); |