diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-07-24 22:34:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-24 22:34:33 -0400 |
commit | cb39d263e751f9cca8055bcacfe5ec863dfe2705 (patch) | |
tree | 6b2bead3545fced8f8b1e8de54d1b0b52e109d24 /drivers/sbus/char | |
parent | 70c83375bb47cadd60fdb923ad913d4f4be75aba (diff) |
[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 <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/sbus/char')
-rw-r--r-- | drivers/sbus/char/envctrl.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index f6ed35b24f43..0c7cd7e7e2e5 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c | |||
@@ -1007,7 +1007,7 @@ static int kenvctrld(void *__unused) | |||
1007 | return -ENODEV; | 1007 | return -ENODEV; |
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | poll_interval = 5 * HZ; /* TODO env_mon_interval */ | 1010 | poll_interval = 5000; /* TODO env_mon_interval */ |
1011 | 1011 | ||
1012 | daemonize("kenvctrld"); | 1012 | daemonize("kenvctrld"); |
1013 | allow_signal(SIGKILL); | 1013 | allow_signal(SIGKILL); |
@@ -1016,10 +1016,7 @@ static int kenvctrld(void *__unused) | |||
1016 | 1016 | ||
1017 | printk(KERN_INFO "envctrl: %s starting...\n", current->comm); | 1017 | printk(KERN_INFO "envctrl: %s starting...\n", current->comm); |
1018 | for (;;) { | 1018 | for (;;) { |
1019 | current->state = TASK_INTERRUPTIBLE; | 1019 | if(msleep_interruptible(poll_interval)) |
1020 | schedule_timeout(poll_interval); | ||
1021 | |||
1022 | if(signal_pending(current)) | ||
1023 | break; | 1020 | break; |
1024 | 1021 | ||
1025 | for (whichcpu = 0; whichcpu < ENVCTRL_MAX_CPU; ++whichcpu) { | 1022 | for (whichcpu = 0; whichcpu < ENVCTRL_MAX_CPU; ++whichcpu) { |