![]() | |||||||||||||
Messages in this thread Patch in this message |
With the __must_check changes in the driver core, bus_rescan_devices_helper() now returns the return code of its call to device_attach(). device_attach() will return < 0 on error, 0 on no match and 1 on match. This means that bus_rescan_devices() will stop after the first successful match for a device, which is probably not what we want. Stopping on error makes sense, however. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -Naurp linux-2.6.18-rc1-mm2/drivers/base/bus.c linux-2.6.18-rc1-mm2+CH/drivers/base/bus.c --- linux-2.6.18-rc1-mm2/drivers/base/bus.c 2006-07-17 18:15:37.000000000 +0200 +++ linux-2.6.18-rc1-mm2+CH/drivers/base/bus.c 2006-07-17 18:17:51.000000000 +0200 @@ -572,7 +572,7 @@ static int __must_check bus_rescan_devic if (dev->parent) up(&dev->parent->sem); } - return ret; + return ret < 0 ? ret : 0; } /** - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||||
| Last update: 2006-07-20 15:03 [W:0.311 / U:2.020 seconds] ©2003-2008 Jasper Spaans | |||||||||||||