]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] drivers/cdrom: fix-up schedule_timeout() usage
authorNishanth Aravamudan <nacc@us.ibm.com>
Sat, 10 Sep 2005 07:27:29 +0000 (00:27 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 10 Sep 2005 17:06:38 +0000 (10:06 -0700)
Use schedule_timeout_{un,}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/cdrom/sbpcd.c
drivers/cdrom/sonycd535.c

index 0b7d7412c4a5f69fcd0ba8ccf34b0d2c084ad7e7..466e9c2974bdd917e7840daa8f075e8f7bda7cb9 100644 (file)
@@ -827,8 +827,7 @@ static void mark_timeout_audio(u_long i)
 static void sbp_sleep(u_int time)
 {
        sti();
-       current->state = TASK_INTERRUPTIBLE;
-       schedule_timeout(time);
+       schedule_timeout_interruptible(time);
        sti();
 }
 /*==========================================================================*/
index 9f22e8f1f6c0182dbbbb9ecd5689d01235f53404..e6565992643260580cbbcaf7e5209a1744fd97f2 100644 (file)
@@ -1478,8 +1478,7 @@ static int __init sony535_init(void)
        /* look for the CD-ROM, follows the procedure in the DOS driver */
        inb(select_unit_reg);
        /* wait for 40 18 Hz ticks (reverse-engineered from DOS driver) */
-       set_current_state(TASK_INTERRUPTIBLE);
-       schedule_timeout((HZ+17)*40/18);
+       schedule_timeout_interruptible((HZ+17)*40/18);
        inb(result_reg);
 
        outb(0, read_status_reg);       /* does a reset? */