diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/macintosh/therm_windtunnel.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index 6d9e7ac7122b..3da0a02efd76 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c | |||
@@ -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; |