Commit b70f4e19 authored by Guido Guenther's avatar Guido Guenther Committed by Linus Torvalds

[PATCH] Mac swsusp driver fixes

Allow swsusp work with macintosh's own thermal sensor drivers enabled.

Contributions from Nathan Hand <nathanh@manu.com.au>
Signed-Of-By: default avatarGuido Guenther <agx@sigcpu.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ea110474
......@@ -22,6 +22,7 @@
#include <linux/spinlock.h>
#include <linux/smp_lock.h>
#include <linux/wait.h>
#include <linux/suspend.h>
#include <asm/prom.h>
#include <asm/machdep.h>
#include <asm/io.h>
......@@ -236,8 +237,10 @@ static int monitor_task(void *arg)
#ifdef DEBUG
int mfan_speed;
#endif
while(!kthread_should_stop())
{
while(!kthread_should_stop()) {
if (current->flags & PF_FREEZE)
refrigerator(PF_FREEZE);
msleep_interruptible(2000);
/* Check status */
......
......@@ -88,6 +88,7 @@
#include <linux/spinlock.h>
#include <linux/smp_lock.h>
#include <linux/wait.h>
#include <linux/suspend.h>
#include <linux/reboot.h>
#include <linux/kmod.h>
#include <linux/i2c.h>
......@@ -1044,6 +1045,11 @@ static int main_control_loop(void *x)
while (state == state_attached) {
unsigned long elapsed, start;
if (current->flags & PF_FREEZE) {
printk(KERN_INFO "therm_pm72: freezing thermostat\n");
refrigerator(PF_FREEZE);
}
start = jiffies;
down(&driver_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment