|
@@ -175,6 +175,7 @@
|
|
#include <linux/cpufreq.h>
|
|
#include <linux/cpufreq.h>
|
|
#include <linux/platform_device.h>
|
|
#include <linux/platform_device.h>
|
|
#include <linux/dma-mapping.h>
|
|
#include <linux/dma-mapping.h>
|
|
|
|
+#include <linux/mutex.h>
|
|
|
|
|
|
#include <asm/hardware.h>
|
|
#include <asm/hardware.h>
|
|
#include <asm/io.h>
|
|
#include <asm/io.h>
|
|
@@ -1108,7 +1109,7 @@ static void set_ctrlr_state(struct sa1100fb_info *fbi, u_int state)
|
|
{
|
|
{
|
|
u_int old_state;
|
|
u_int old_state;
|
|
|
|
|
|
- down(&fbi->ctrlr_sem);
|
|
|
|
|
|
+ mutex_lock(&fbi->ctrlr_lock);
|
|
|
|
|
|
old_state = fbi->state;
|
|
old_state = fbi->state;
|
|
|
|
|
|
@@ -1193,7 +1194,7 @@ static void set_ctrlr_state(struct sa1100fb_info *fbi, u_int state)
|
|
}
|
|
}
|
|
break;
|
|
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_waitqueue_head(&fbi->ctrlr_wait);
|
|
INIT_WORK(&fbi->task, sa1100fb_task);
|
|
INIT_WORK(&fbi->task, sa1100fb_task);
|
|
- init_MUTEX(&fbi->ctrlr_sem);
|
|
|
|
|
|
+ mutex_init(&fbi->ctrlr_lock);
|
|
|
|
|
|
return fbi;
|
|
return fbi;
|
|
}
|
|
}
|