aboutsummaryrefslogtreecommitdiffstats
path: root/init/do_mounts_md.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2009-02-14 01:59:06 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-21 14:17:17 -0800
commit216773a787c3c46ef26bf1742c1fdba37d26be45 (patch)
treeaac387553fd53cb0c06b5cc2ee86329ce793bed6 /init/do_mounts_md.c
parentLinux 2.6.29-rc5 (diff)
downloadlinux-dev-216773a787c3c46ef26bf1742c1fdba37d26be45.tar.xz
linux-dev-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 '')
-rw-r--r--init/do_mounts_md.c5
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);