aboutsummaryrefslogtreecommitdiffstats
path: root/init/do_mounts.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2009-02-13 19:59:06 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-21 17:17:17 -0500
commit216773a787c3c46ef26bf1742c1fdba37d26be45 (patch)
treeaac387553fd53cb0c06b5cc2ee86329ce793bed6 /init/do_mounts.c
parentd2f8d7ee1a9b4650b4e43325b321801264f7c37a (diff)
Consolidate driver_probe_done() loops into one place
there's a few places that currently loop over driver_probe_done(), and I'm about to add another one. This patch abstracts it into a helper to reduce duplication. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Len Brown <lenb@kernel.org> Acked-by: Greg KH <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init/do_mounts.c')
-rw-r--r--init/do_mounts.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 708105e163df..8d4ff5afc1d8 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -370,10 +370,14 @@ void __init prepare_namespace(void)
370 ssleep(root_delay); 370 ssleep(root_delay);
371 } 371 }
372 372
373 /* wait for the known devices to complete their probing */ 373 /*
374 while (driver_probe_done() != 0) 374 * wait for the known devices to complete their probing
375 msleep(100); 375 *
376 async_synchronize_full(); 376 * Note: this is a potential source of long boot delays.
377 * For example, it is not atypical to wait 5 seconds here
378 * for the touchpad of a laptop to initialize.
379 */
380 wait_for_device_probe();
377 381
378 md_run_setup(); 382 md_run_setup();
379 383
@@ -399,6 +403,7 @@ void __init prepare_namespace(void)
399 while (driver_probe_done() != 0 || 403 while (driver_probe_done() != 0 ||
400 (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0) 404 (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)
401 msleep(100); 405 msleep(100);
406 async_synchronize_full();
402 } 407 }
403 408
404 is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; 409 is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;