Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ed2ddf3 authored by Johannes Berg's avatar Johannes Berg Committed by Paul Mackerras
Browse files

[POWERPC] windfarm: don't die on suspend thread signal



When the windfarm thread gets a suspend signal it will die instead of
freezing. This fixes it.

Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 92d4dda3
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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;
		}