]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] windfarm: don't die on suspend thread signal
authorJohannes Berg <johannes@sipsolutions.net>
Mon, 5 Feb 2007 18:30:29 +0000 (19:30 +0100)
committerPaul Mackerras <paulus@samba.org>
Thu, 8 Feb 2007 05:08:39 +0000 (16:08 +1100)
When the windfarm thread gets a suspend signal it will die instead of
freezing. This fixes it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
drivers/macintosh/windfarm_core.c

index e947af982f93503b0e20bd321247e4c6770b3abe..94c117ef20c1d74b59e4c445ef3e006f01399c51 100644 (file)
@@ -94,8 +94,6 @@ static int wf_thread_func(void *data)
        DBG("wf: thread started\n");
 
        while(!kthread_should_stop()) {
-               try_to_freeze();
-
                if (time_after_eq(jiffies, next)) {
                        wf_notify(WF_EVENT_TICK, NULL);
                        if (wf_overtemp) {
@@ -118,8 +116,8 @@ static int wf_thread_func(void *data)
                if (delay <= HZ)
                        schedule_timeout_interruptible(delay);
 
-               /* there should be no signal, but oh well */
-               if (signal_pending(current)) {
+               /* 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;
                }