diff options
author | Matthias Kaehlcke <matthias@kaehlcke.net> | 2008-07-24 08:31:14 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 21:47:37 +0400 |
commit | b91dbce56a8dbf312f6255d5121b295553d2b4db (patch) | |
tree | 77c3a0e93f4cca9b2c4ef2b73bce66acc792f60c /drivers/video/pxafb.c | |
parent | 14aefd1b49ff3bd13caa37fb06bd53488d5d1486 (diff) | |
download | linux-b91dbce56a8dbf312f6255d5121b295553d2b4db.tar.xz |
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.c | 7 |
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 @@ #include <linux/clk.h> #include <linux/err.h> #include <linux/completion.h> +#include <linux/mutex.h> #include <linux/kthread.h> #include <linux/freezer.h> @@ -1117,7 +1118,7 @@ static void set_ctrlr_state(struct pxafb_info *fbi, u_int state) { u_int old_state; - down(&fbi->ctrlr_sem); + mutex_lock(&fbi->ctrlr_lock); old_state = fbi->state; @@ -1205,7 +1206,7 @@ static void set_ctrlr_state(struct pxafb_info *fbi, u_int state) } break; } - up(&fbi->ctrlr_sem); + mutex_unlock(&fbi->ctrlr_lock); } /* @@ -1458,7 +1459,7 @@ static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev) init_waitqueue_head(&fbi->ctrlr_wait); INIT_WORK(&fbi->task, pxafb_task); - init_MUTEX(&fbi->ctrlr_sem); + mutex_init(&fbi->ctrlr_lock); init_completion(&fbi->disable_done); #ifdef CONFIG_FB_PXA_SMARTPANEL init_completion(&fbi->command_done); |