diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-05-05 13:59:37 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-05-05 13:59:37 +0100 |
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 f4fa27315fb..2b3902c867d 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -405,9 +405,8 @@ void device_release_driver(struct device * dev) static void driver_detach(struct device_driver * drv) { - struct list_head * entry, * next; - list_for_each_safe(entry, next, &drv->devices) { - struct device * dev = container_of(entry, struct device, driver_list); + while (!list_empty(&drv->devices)) { + struct device * dev = container_of(drv->devices.next, struct device, driver_list); device_release_driver(dev); } } |