From cb39d263e751f9cca8055bcacfe5ec863dfe2705 Mon Sep 17 00:00:00 2001 From: Nishanth Aravamudan Date: Sun, 24 Jul 2005 19:34:33 -0700 Subject: [PATCH] [SPARC]: sbus/envctrl: replace schedule_timeout() with msleep_interruptible() Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected. Change the units of poll_interval to msecs as it is only used in this delay. Signed-off-by: Nishanth Aravamudan Signed-off-by: Domen Puncer Signed-off-by: David S. Miller --- drivers/sbus/char/envctrl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index f6ed35b24f4..0c7cd7e7e2e 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c @@ -1007,7 +1007,7 @@ static int kenvctrld(void *__unused) return -ENODEV; } - poll_interval = 5 * HZ; /* TODO env_mon_interval */ + poll_interval = 5000; /* TODO env_mon_interval */ daemonize("kenvctrld"); allow_signal(SIGKILL); @@ -1016,10 +1016,7 @@ static int kenvctrld(void *__unused) printk(KERN_INFO "envctrl: %s starting...\n", current->comm); for (;;) { - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(poll_interval); - - if(signal_pending(current)) + if(msleep_interruptible(poll_interval)) break; for (whichcpu = 0; whichcpu < ENVCTRL_MAX_CPU; ++whichcpu) { -- 2.20.1