Pull error-inject into release branch
[powerpc.git] / drivers / macintosh / windfarm_core.c
index ab3faa7..94c117e 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/device.h>
 #include <linux/platform_device.h>
 #include <linux/mutex.h>
+#include <linux/freezer.h>
 
 #include <asm/prom.h>
 
@@ -93,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) {
@@ -117,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;
                }