提交 2ddee1b7 编写于 作者: N Nishanth Aravamudan 提交者: Linus Torvalds

[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: NNishanth Aravamudan <nacc@us.ibm.com>
Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: NAdrian Bunk <bunk@stusta.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 86e84862
......@@ -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();
}
/*==========================================================================*/
......
......@@ -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? */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册