summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-11-07 01:01:14 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 07:53:56 -0800
commitbc874d174b224c016adac85fc9dd6da1161ffc57 (patch)
tree4f0f14a1936cb976dec527c977e529660388dc91 /arch
parent8f09f4a25a927080e1fa1331735c3d1b5664866b (diff)
downloadlinux-bc874d174b224c016adac85fc9dd6da1161ffc57.tar.bz2
[PATCH] um: 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> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/drivers/random.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c
index f9e22198e011..ba471f5864a6 100644
--- a/arch/um/drivers/random.c
+++ b/arch/um/drivers/random.c
@@ -58,10 +58,8 @@ static ssize_t rng_dev_read (struct file *filp, char __user *buf, size_t size,
if (filp->f_flags & O_NONBLOCK)
return ret ? : -EAGAIN;
- if(need_resched()){
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(1);
- }
+ if(need_resched())
+ schedule_timeout_interruptible(1);
}
else return n;
if (signal_pending (current))