From 7951ac91c7d45b61f54f1cdabc24b52b40785de6 Mon Sep 17 00:00:00 2001 From: Matthias Kaehlcke Date: Wed, 23 Jul 2008 21:31:16 -0700 Subject: sa1100fb: 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/sa1100fb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/video/sa1100fb.c') diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c index 4a9f7e121807..78bcdbc3f484 100644 --- a/drivers/video/sa1100fb.c +++ b/drivers/video/sa1100fb.c @@ -175,6 +175,7 @@ #include #include #include +#include #include #include @@ -1108,7 +1109,7 @@ static void set_ctrlr_state(struct sa1100fb_info *fbi, u_int state) { u_int old_state; - down(&fbi->ctrlr_sem); + mutex_lock(&fbi->ctrlr_lock); old_state = fbi->state; @@ -1193,7 +1194,7 @@ static void set_ctrlr_state(struct sa1100fb_info *fbi, u_int state) } break; } - up(&fbi->ctrlr_sem); + mutex_unlock(&fbi->ctrlr_lock); } /* @@ -1445,7 +1446,7 @@ static struct sa1100fb_info * __init sa1100fb_init_fbinfo(struct device *dev) init_waitqueue_head(&fbi->ctrlr_wait); INIT_WORK(&fbi->task, sa1100fb_task); - init_MUTEX(&fbi->ctrlr_sem); + mutex_init(&fbi->ctrlr_lock); return fbi; } -- cgit v1.2.2