diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-07-21 00:55:14 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-07-21 00:55:14 -0400 |
commit | 908cf4b925e419bc74f3297b2f0e51d6f8a81da2 (patch) | |
tree | 6c2da79366d4695a9c2560ab18259eca8a2a25b4 /drivers/macintosh/therm_windtunnel.c | |
parent | 92c49890922d54cba4b1eadeb0b185773c2c9570 (diff) | |
parent | 14b395e35d1afdd8019d11b92e28041fad591b71 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next
Diffstat (limited to 'drivers/macintosh/therm_windtunnel.c')
-rw-r--r-- | drivers/macintosh/therm_windtunnel.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index d11821af3b8d..3da0a02efd76 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c | |||
@@ -37,13 +37,13 @@ | |||
37 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
38 | #include <linux/init.h> | 38 | #include <linux/init.h> |
39 | #include <linux/kthread.h> | 39 | #include <linux/kthread.h> |
40 | #include <linux/of_platform.h> | ||
40 | 41 | ||
41 | #include <asm/prom.h> | 42 | #include <asm/prom.h> |
42 | #include <asm/machdep.h> | 43 | #include <asm/machdep.h> |
43 | #include <asm/io.h> | 44 | #include <asm/io.h> |
44 | #include <asm/system.h> | 45 | #include <asm/system.h> |
45 | #include <asm/sections.h> | 46 | #include <asm/sections.h> |
46 | #include <asm/of_platform.h> | ||
47 | #include <asm/macio.h> | 47 | #include <asm/macio.h> |
48 | 48 | ||
49 | #define LOG_TEMP 0 /* continously log temperature */ | 49 | #define LOG_TEMP 0 /* continously log temperature */ |
@@ -62,7 +62,7 @@ static struct { | |||
62 | volatile int running; | 62 | volatile int running; |
63 | struct task_struct *poll_task; | 63 | struct task_struct *poll_task; |
64 | 64 | ||
65 | struct semaphore lock; | 65 | struct mutex lock; |
66 | struct of_device *of_dev; | 66 | struct of_device *of_dev; |
67 | 67 | ||
68 | struct i2c_client *thermostat; | 68 | struct i2c_client *thermostat; |
@@ -286,23 +286,23 @@ restore_regs( void ) | |||
286 | 286 | ||
287 | static int control_loop(void *dummy) | 287 | static int control_loop(void *dummy) |
288 | { | 288 | { |
289 | down(&x.lock); | 289 | mutex_lock(&x.lock); |
290 | setup_hardware(); | 290 | setup_hardware(); |
291 | up(&x.lock); | 291 | mutex_unlock(&x.lock); |
292 | 292 | ||
293 | for (;;) { | 293 | for (;;) { |
294 | msleep_interruptible(8000); | 294 | msleep_interruptible(8000); |
295 | if (kthread_should_stop()) | 295 | if (kthread_should_stop()) |
296 | break; | 296 | break; |
297 | 297 | ||
298 | down(&x.lock); | 298 | mutex_lock(&x.lock); |
299 | poll_temp(); | 299 | poll_temp(); |
300 | up(&x.lock); | 300 | mutex_unlock(&x.lock); |
301 | } | 301 | } |
302 | 302 | ||
303 | down(&x.lock); | 303 | mutex_lock(&x.lock); |
304 | restore_regs(); | 304 | restore_regs(); |
305 | up(&x.lock); | 305 | mutex_unlock(&x.lock); |
306 | 306 | ||
307 | return 0; | 307 | return 0; |
308 | } | 308 | } |
@@ -489,7 +489,7 @@ g4fan_init( void ) | |||
489 | const struct apple_thermal_info *info; | 489 | const struct apple_thermal_info *info; |
490 | struct device_node *np; | 490 | struct device_node *np; |
491 | 491 | ||
492 | init_MUTEX( &x.lock ); | 492 | mutex_init(&x.lock); |
493 | 493 | ||
494 | if( !(np=of_find_node_by_name(NULL, "power-mgt")) ) | 494 | if( !(np=of_find_node_by_name(NULL, "power-mgt")) ) |
495 | return -ENODEV; | 495 | return -ENODEV; |