aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/pxafb.c
diff options
context:
space:
mode:
authorMatthias Kaehlcke <matthias@kaehlcke.net>2008-07-24 00:31:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 13:47:37 -0400
commitb91dbce56a8dbf312f6255d5121b295553d2b4db (patch)
tree77c3a0e93f4cca9b2c4ef2b73bce66acc792f60c /drivers/video/pxafb.c
parent14aefd1b49ff3bd13caa37fb06bd53488d5d1486 (diff)
pxafb: convert ctrlr_sem in a mutex
The semaphore ctrlr_sem is used as a mutex. Convert it to the mutex API. Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Cc: Daniel Mack <daniel@caiaq.de> Cc: Eric Miao <eric.miao@marvell.com> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/pxafb.c')
-rw-r--r--drivers/video/pxafb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 5e8a140399fc..2b707a8ce5de 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -41,6 +41,7 @@
41#include <linux/clk.h> 41#include <linux/clk.h>
42#include <linux/err.h> 42#include <linux/err.h>
43#include <linux/completion.h> 43#include <linux/completion.h>
44#include <linux/mutex.h>
44#include <linux/kthread.h> 45#include <linux/kthread.h>
45#include <linux/freezer.h> 46#include <linux/freezer.h>
46 47
@@ -1117,7 +1118,7 @@ static void set_ctrlr_state(struct pxafb_info *fbi, u_int state)
1117{ 1118{
1118 u_int old_state; 1119 u_int old_state;
1119 1120
1120 down(&fbi->ctrlr_sem); 1121 mutex_lock(&fbi->ctrlr_lock);
1121 1122
1122 old_state = fbi->state; 1123 old_state = fbi->state;
1123 1124
@@ -1205,7 +1206,7 @@ static void set_ctrlr_state(struct pxafb_info *fbi, u_int state)
1205 } 1206 }
1206 break; 1207 break;
1207 } 1208 }
1208 up(&fbi->ctrlr_sem); 1209 mutex_unlock(&fbi->ctrlr_lock);
1209} 1210}
1210 1211
1211/* 1212/*
@@ -1458,7 +1459,7 @@ static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev)
1458 1459
1459 init_waitqueue_head(&fbi->ctrlr_wait); 1460 init_waitqueue_head(&fbi->ctrlr_wait);
1460 INIT_WORK(&fbi->task, pxafb_task); 1461 INIT_WORK(&fbi->task, pxafb_task);
1461 init_MUTEX(&fbi->ctrlr_sem); 1462 mutex_init(&fbi->ctrlr_lock);
1462 init_completion(&fbi->disable_done); 1463 init_completion(&fbi->disable_done);
1463#ifdef CONFIG_FB_PXA_SMARTPANEL 1464#ifdef CONFIG_FB_PXA_SMARTPANEL
1464 init_completion(&fbi->command_done); 1465 init_completion(&fbi->command_done);