From: Nishanth Aravamudan Date: Sat, 10 Sep 2005 07:27:29 +0000 (-0700) Subject: [PATCH] drivers/cdrom: fix-up schedule_timeout() usage X-Git-Tag: v2.6.14-rc1~147 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ddee1b7a732dc96d479afaa7d0a26aa53990089;p=linux-2.6 [PATCH] drivers/cdrom: fix-up schedule_timeout() usage Use schedule_timeout_{un,}interruptible() instead of set_current_state()/schedule_timeout() to reduce kernel size. Signed-off-by: Nishanth Aravamudan Cc: Jens Axboe Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/cdrom/sbpcd.c b/drivers/cdrom/sbpcd.c index 0b7d7412c4..466e9c2974 100644 --- a/drivers/cdrom/sbpcd.c +++ b/drivers/cdrom/sbpcd.c @@ -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(); } /*==========================================================================*/ diff --git a/drivers/cdrom/sonycd535.c b/drivers/cdrom/sonycd535.c index 9f22e8f1f6..e656599264 100644 --- a/drivers/cdrom/sonycd535.c +++ b/drivers/cdrom/sonycd535.c @@ -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? */