Allow swsusp work with macintosh's own thermal sensor drivers enabled.
Contributions from Nathan Hand <nathanh@manu.com.au>
Signed-Of-By: Guido Guenther <agx@sigcpu.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
#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>
#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 */
#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>
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);