diff -Naru a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c --- a/drivers/macintosh/therm_adt746x.c 2005-04-14 03:20:34 -07:00 +++ b/drivers/macintosh/therm_adt746x.c 2005-04-14 03:20:34 -07:00 @@ -28,6 +28,7 @@ #include #include #include +#include #undef DEBUG @@ -70,7 +71,6 @@ static int therm_bus, therm_address; static struct of_device * of_dev; static struct thermostat* thermostat; -static pid_t monitor_thread_id; static int monitor_running; static struct completion monitor_task_compl; @@ -237,16 +237,11 @@ #ifdef DEBUG int mfan_speed; #endif - - lock_kernel(); - daemonize("kfand"); - unlock_kernel(); - strcpy(current->comm, "thermostat"); monitor_running = 1; while(monitor_running) { - msleep(2000); + msleep_interruptible(2000); /* Check status */ /* local : chip */ @@ -405,8 +400,7 @@ init_completion(&monitor_task_compl); - monitor_thread_id = kernel_thread(monitor_task, th, - SIGCHLD | CLONE_KERNEL); + kthread_run(monitor_task, th, "kfand"); return 0; } # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/03 09:14:01-07:00 colin@colino.net # [PATCH] therm_adt746x: don't change loadavg # # Use interruptible sleep rather than uninterruptible. # # Partially convert it to the kthread API so the kernel thread doesn't get # accidentally signalled. # # Signed-off-by: Colin Leroy # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/macintosh/therm_adt746x.c # 2004/10/02 21:37:17-07:00 colin@colino.net +3 -9 # therm_adt746x: don't change loadavg #