From: Nishanth Aravamudan Date: Mon, 7 Nov 2005 09:01:14 +0000 (-0800) Subject: [PATCH] um: fix-up schedule_timeout() usage X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bc874d174b224c016adac85fc9dd6da1161ffc57;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [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 Acked-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c index f9e22198e01..ba471f5864a 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))