diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2009-02-14 01:59:06 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-21 14:17:17 -0800 |
commit | 216773a787c3c46ef26bf1742c1fdba37d26be45 (patch) | |
tree | aac387553fd53cb0c06b5cc2ee86329ce793bed6 /init/do_mounts.c | |
parent | d2f8d7ee1a9b4650b4e43325b321801264f7c37a (diff) | |
download | blackbird-op-linux-216773a787c3c46ef26bf1742c1fdba37d26be45.tar.gz blackbird-op-linux-216773a787c3c46ef26bf1742c1fdba37d26be45.zip |
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.c | 13 |
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) ssleep(root_delay); } - /* wait for the known devices to complete their probing */ - while (driver_probe_done() != 0) - msleep(100); - async_synchronize_full(); + /* + * wait for the known devices to complete their probing + * + * Note: this is a potential source of long boot delays. + * For example, it is not atypical to wait 5 seconds here + * for the touchpad of a laptop to initialize. + */ + wait_for_device_probe(); md_run_setup(); @@ -399,6 +403,7 @@ void __init prepare_namespace(void) while (driver_probe_done() != 0 || (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0) msleep(100); + async_synchronize_full(); } is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; |