driver core: don't fail attaching the device if it cannot be bound
authorCornelia Huck <cornelia.huck@de.ibm.com>
Tue, 6 Feb 2007 00:15:26 +0000 (16:15 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 27 Apr 2007 17:57:29 +0000 (10:57 -0700)
commitc6a46696f97ff260a4ecce5e287f8de4b9d7fe14
tree335de50c9868cd575f535677e430677d33cbaaa1
parenteed40d3ad2ba652c08422d62a5ff6f62ac0be16d
driver core: don't fail attaching the device if it cannot be bound

Don't fail bus_attach_device() if the device cannot be bound.

If dev->driver has been specified, reset it to NULL if device_bind_driver()
failed and add the device as an unbound device.  As a result,
bus_attach_device() now cannot fail, and we can remove some checking from
device_add().

Also remove an unneeded check in bus_rescan_devices_helper().

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/base.h
drivers/base/bus.c
drivers/base/core.c
drivers/base/dd.c