aboutsummaryrefslogtreecommitdiffstats
path: root/init/do_mounts_md.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_md.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_md.c')
-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)
281 */ 281 */
282 printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n"); 282 printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n");
283 printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n"); 283 printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n");
284 while (driver_probe_done() < 0) 284
285 msleep(100); 285 wait_for_device_probe();
286
286 fd = sys_open("/dev/md0", 0, 0); 287 fd = sys_open("/dev/md0", 0, 0);
287 if (fd >= 0) { 288 if (fd >= 0) {
288 sys_ioctl(fd, RAID_AUTORUN, raid_autopart); 289 sys_ioctl(fd, RAID_AUTORUN, raid_autopart);