X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmacintosh%2Fwindfarm_core.c;h=075b4d99e35497c9a8f505af04d1fdf617489680;hb=8561b089afbaed2651591e5a4574fdca451d82f2;hp=4fcb245ba184edd3d06684f4e2572b5571918212;hpb=b91cba52e9b7b3f1c0037908a192d93a869ca9e5;p=linux-2.6-omap-h63xx.git diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c index 4fcb245ba18..075b4d99e35 100644 --- a/drivers/macintosh/windfarm_core.c +++ b/drivers/macintosh/windfarm_core.c @@ -80,7 +80,8 @@ int wf_critical_overtemp(void) "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL }; - return call_usermodehelper(critical_overtemp_path, argv, envp, 0); + return call_usermodehelper(critical_overtemp_path, + argv, envp, UMH_WAIT_EXEC); } EXPORT_SYMBOL_GPL(wf_critical_overtemp); @@ -92,7 +93,10 @@ static int wf_thread_func(void *data) DBG("wf: thread started\n"); - while(!kthread_should_stop()) { + set_freezable(); + while (!kthread_should_stop()) { + try_to_freeze(); + if (time_after_eq(jiffies, next)) { wf_notify(WF_EVENT_TICK, NULL); if (wf_overtemp) { @@ -114,12 +118,6 @@ static int wf_thread_func(void *data) delay = next - jiffies; if (delay <= HZ) schedule_timeout_interruptible(delay); - - /* there should be no non-suspend signal, but oh well */ - if (signal_pending(current) && !try_to_freeze()) { - printk(KERN_WARNING "windfarm: thread got sigl !\n"); - break; - } } DBG("wf: thread stopped\n");