diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-05-05 08:59:37 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-05-05 08:59:37 -0400 |
commit | bfd4bda097f8758d28e632ff2035e25577f6b060 (patch) | |
tree | 022276b3625a432c7132e39776e7e448445087ac /drivers/base/bus.c | |
parent | 488f2eaca1b0831a5a5e6a66e33bad2cdeff7238 (diff) | |
parent | b2d84f078a8be40f5ae3b4d2ac001e2a7f45fe4f (diff) |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r-- | drivers/base/bus.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index f4fa27315fb4..2b3902c867da 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -405,9 +405,8 @@ void device_release_driver(struct device * dev) | |||
405 | 405 | ||
406 | static void driver_detach(struct device_driver * drv) | 406 | static void driver_detach(struct device_driver * drv) |
407 | { | 407 | { |
408 | struct list_head * entry, * next; | 408 | while (!list_empty(&drv->devices)) { |
409 | list_for_each_safe(entry, next, &drv->devices) { | 409 | struct device * dev = container_of(drv->devices.next, struct device, driver_list); |
410 | struct device * dev = container_of(entry, struct device, driver_list); | ||
411 | device_release_driver(dev); | 410 | device_release_driver(dev); |
412 | } | 411 | } |
413 | } | 412 | } |