diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/macintosh/therm_pm72.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index e43554e754a4..6fadc9ac66b0 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -121,6 +121,7 @@ | |||
121 | #include <linux/reboot.h> | 121 | #include <linux/reboot.h> |
122 | #include <linux/kmod.h> | 122 | #include <linux/kmod.h> |
123 | #include <linux/i2c.h> | 123 | #include <linux/i2c.h> |
124 | #include <linux/kthread.h> | ||
124 | #include <asm/prom.h> | 125 | #include <asm/prom.h> |
125 | #include <asm/machdep.h> | 126 | #include <asm/machdep.h> |
126 | #include <asm/io.h> | 127 | #include <asm/io.h> |
@@ -161,7 +162,7 @@ static struct slots_pid_state slots_state; | |||
161 | static int state; | 162 | static int state; |
162 | static int cpu_count; | 163 | static int cpu_count; |
163 | static int cpu_pid_type; | 164 | static int cpu_pid_type; |
164 | static pid_t ctrl_task; | 165 | static struct task_struct *ctrl_task; |
165 | static struct completion ctrl_complete; | 166 | static struct completion ctrl_complete; |
166 | static int critical_state; | 167 | static int critical_state; |
167 | static int rackmac; | 168 | static int rackmac; |
@@ -1779,8 +1780,6 @@ static int call_critical_overtemp(void) | |||
1779 | */ | 1780 | */ |
1780 | static int main_control_loop(void *x) | 1781 | static int main_control_loop(void *x) |
1781 | { | 1782 | { |
1782 | daemonize("kfand"); | ||
1783 | |||
1784 | DBG("main_control_loop started\n"); | 1783 | DBG("main_control_loop started\n"); |
1785 | 1784 | ||
1786 | down(&driver_lock); | 1785 | down(&driver_lock); |
@@ -1956,7 +1955,7 @@ static void start_control_loops(void) | |||
1956 | { | 1955 | { |
1957 | init_completion(&ctrl_complete); | 1956 | init_completion(&ctrl_complete); |
1958 | 1957 | ||
1959 | ctrl_task = kernel_thread(main_control_loop, NULL, SIGCHLD | CLONE_KERNEL); | 1958 | ctrl_task = kthread_run(main_control_loop, NULL, "kfand"); |
1960 | } | 1959 | } |
1961 | 1960 | ||
1962 | /* | 1961 | /* |
@@ -1964,7 +1963,7 @@ static void start_control_loops(void) | |||
1964 | */ | 1963 | */ |
1965 | static void stop_control_loops(void) | 1964 | static void stop_control_loops(void) |
1966 | { | 1965 | { |
1967 | if (ctrl_task != 0) | 1966 | if (ctrl_task) |
1968 | wait_for_completion(&ctrl_complete); | 1967 | wait_for_completion(&ctrl_complete); |
1969 | } | 1968 | } |
1970 | 1969 | ||