Commit b91dbce5 authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Linus Torvalds

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: default avatarMatthias 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 14aefd1b
......@@ -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);
......
......@@ -106,7 +106,7 @@ struct pxafb_info {
volatile u_char state;
volatile u_char task_state;
struct semaphore ctrlr_sem;
struct mutex ctrlr_lock;
wait_queue_head_t ctrlr_wait;
struct work_struct task;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment