aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random.c
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-09-10 03:27:30 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-10 13:06:38 -0400
commitda4cd8dfe18ee901b880f94ca0fa79d5cc1cd0eb (patch)
tree7f135b3c3d9450e3b489cd39af6085e338013613 /drivers/char/hw_random.c
parent2ddee1b7a732dc96d479afaa7d0a26aa53990089 (diff)
[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>
Diffstat (limited to 'drivers/char/hw_random.c')
-rw-r--r--drivers/char/hw_random.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/char/hw_random.c b/drivers/char/hw_random.c
index 3480535a09c5..6f673d2de0b1 100644
--- a/drivers/char/hw_random.c
+++ b/drivers/char/hw_random.c
@@ -513,10 +513,7 @@ static ssize_t rng_dev_read (struct file *filp, char __user *buf, size_t size,
513 return ret ? : -EAGAIN; 513 return ret ? : -EAGAIN;
514 514
515 if(need_resched()) 515 if(need_resched())
516 { 516 schedule_timeout_interruptible(1);
517 current->state = TASK_INTERRUPTIBLE;
518 schedule_timeout(1);
519 }
520 else 517 else
521 udelay(200); /* FIXME: We could poll for 250uS ?? */ 518 udelay(200); /* FIXME: We could poll for 250uS ?? */
522 519