X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fsbus%2Fchar%2Fbbc_envctrl.c;h=d5259f7fee6d056957a1d0bfa366f374dff28045;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=f028b154a95d6319d11a9f982bd93ab85eba3475;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c index f028b154a..d5259f7fe 100644 --- a/drivers/sbus/char/bbc_envctrl.c +++ b/drivers/sbus/char/bbc_envctrl.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #define __KERNEL_SYSCALLS__ @@ -451,7 +452,7 @@ static void fans_full_blast(void) } } -#define POLL_INTERVAL (5 * HZ) +#define POLL_INTERVAL (5 * 1000) static unsigned long last_warning_jiffies; static struct task_struct *kenvctrld_task; @@ -467,8 +468,7 @@ static int kenvctrld(void *__unused) struct bbc_cpu_temperature *tp; struct bbc_fan_control *fp; - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(POLL_INTERVAL); + msleep_interruptible(POLL_INTERVAL); if (signal_pending(current)) break; @@ -622,9 +622,7 @@ void bbc_envctrl_cleanup(void) read_unlock(&tasklist_lock); if (!found) break; - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(HZ); - current->state = TASK_RUNNING; + msleep(1000); } kenvctrld_task = NULL; }