aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/sa1100fb.c7
-rw-r--r--drivers/video/sa1100fb.h2
2 files changed, 5 insertions, 4 deletions
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 @@
175#include <linux/cpufreq.h> 175#include <linux/cpufreq.h>
176#include <linux/platform_device.h> 176#include <linux/platform_device.h>
177#include <linux/dma-mapping.h> 177#include <linux/dma-mapping.h>
178#include <linux/mutex.h>
178 179
179#include <asm/hardware.h> 180#include <asm/hardware.h>
180#include <asm/io.h> 181#include <asm/io.h>
@@ -1108,7 +1109,7 @@ static void set_ctrlr_state(struct sa1100fb_info *fbi, u_int state)
1108{ 1109{
1109 u_int old_state; 1110 u_int old_state;
1110 1111
1111 down(&fbi->ctrlr_sem); 1112 mutex_lock(&fbi->ctrlr_lock);
1112 1113
1113 old_state = fbi->state; 1114 old_state = fbi->state;
1114 1115
@@ -1193,7 +1194,7 @@ static void set_ctrlr_state(struct sa1100fb_info *fbi, u_int state)
1193 } 1194 }
1194 break; 1195 break;
1195 } 1196 }
1196 up(&fbi->ctrlr_sem); 1197 mutex_unlock(&fbi->ctrlr_lock);
1197} 1198}
1198 1199
1199/* 1200/*
@@ -1445,7 +1446,7 @@ static struct sa1100fb_info * __init sa1100fb_init_fbinfo(struct device *dev)
1445 1446
1446 init_waitqueue_head(&fbi->ctrlr_wait); 1447 init_waitqueue_head(&fbi->ctrlr_wait);
1447 INIT_WORK(&fbi->task, sa1100fb_task); 1448 INIT_WORK(&fbi->task, sa1100fb_task);
1448 init_MUTEX(&fbi->ctrlr_sem); 1449 mutex_init(&fbi->ctrlr_lock);
1449 1450
1450 return fbi; 1451 return fbi;
1451} 1452}
diff --git a/drivers/video/sa1100fb.h b/drivers/video/sa1100fb.h
index f465b27ed860..86831db9a042 100644
--- a/drivers/video/sa1100fb.h
+++ b/drivers/video/sa1100fb.h
@@ -100,7 +100,7 @@ struct sa1100fb_info {
100 100
101 volatile u_char state; 101 volatile u_char state;
102 volatile u_char task_state; 102 volatile u_char task_state;
103 struct semaphore ctrlr_sem; 103 struct mutex ctrlr_lock;
104 wait_queue_head_t ctrlr_wait; 104 wait_queue_head_t ctrlr_wait;
105 struct work_struct task; 105 struct work_struct task;
106 106