[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:

committed by
Linus Torvalds

parent
2ddee1b7a7
commit
da4cd8dfe1
@@ -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 ?? */
|
||||
|
||||
|
Reference in New Issue
Block a user