[PATCH] drivers/char: fix-up schedule_timeout() usage

Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Nishanth Aravamudan
2005-09-10 00:27:30 -07:00
committed by Linus Torvalds
parent 2ddee1b7a7
commit da4cd8dfe1
6 changed files with 17 additions and 36 deletions

View File

@@ -513,10 +513,7 @@ static ssize_t rng_dev_read (struct file *filp, char __user *buf, size_t size,
return ret ? : -EAGAIN;
if(need_resched())
{
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(1);
}
schedule_timeout_interruptible(1);
else
udelay(200); /* FIXME: We could poll for 250uS ?? */