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_md.c | |
parent | d2f8d7ee1a9b4650b4e43325b321801264f7c37a (diff) | |
download | linux-216773a787c3c46ef26bf1742c1fdba37d26be45.tar.gz linux-216773a787c3c46ef26bf1742c1fdba37d26be45.tar.bz2 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_md.c')
-rw-r--r-- | init/do_mounts_md.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c index ff95e3192884..9bdddbcb3d6a 100644 --- a/init/do_mounts_md.c +++ b/init/do_mounts_md.c @@ -281,8 +281,9 @@ static void __init autodetect_raid(void) */ printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n"); printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n"); - while (driver_probe_done() < 0) - msleep(100); + + wait_for_device_probe(); + fd = sys_open("/dev/md0", 0, 0); if (fd >= 0) { sys_ioctl(fd, RAID_AUTORUN, raid_autopart); |