aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDaniel Walker <dwalker@mvista.com>2008-06-09 19:26:08 -0400
committerPaul Mackerras <paulus@samba.org>2008-06-30 08:30:46 -0400
commit1baaeea00594776978d875a0f618591056a3705a (patch)
treee311d43ea86c2181ca5039d33c8f9d0ea4ab0ec4 /drivers
parentb1e2270ffefb636afd71bbb8bf19aedff0e5ac3d (diff)
macintosh/therm_windtunnel: Convert semaphore to mutex
Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/macintosh/therm_windtunnel.c16
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
287static int control_loop(void *dummy) 287static 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;