]> git.hungrycats.org Git - linux/commitdiff
[PATCH] mcd: replace schedule_timeout() with msleep()
authorMaximilian Attems <janitor@sternwelten.at>
Fri, 3 Sep 2004 03:36:43 +0000 (20:36 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 3 Sep 2004 03:36:43 +0000 (20:36 -0700)
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/cdrom/mcd.c

index 4cb0fb491c65a3a33c1fa7949c8ed9333b59c939..b4f5e02957a6f646c5551d88269a2af3c0af95c9 100644 (file)
@@ -1021,10 +1021,9 @@ static int mcd_open(struct cdrom_device_info *cdi, int purpose)
                st = statusCmd();       /* check drive status */
                if (st == -1)
                        goto err_out;   /* drive doesn't respond */
-               if ((st & MST_READY) == 0) {    /* no disk? wait a sec... */
-                       current->state = TASK_INTERRUPTIBLE;
-                       schedule_timeout(HZ);
-               }
+               if ((st & MST_READY) == 0)      /* no disk? wait a sec... */
+                       msleep(1000);
+
        } while (((st & MST_READY) == 0) && count++ < MCD_RETRY_ATTEMPTS);
 
        if (updateToc() < 0)