aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bw-qcam.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-02-07 06:49:14 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-02-07 06:49:14 -0200
commit3593cab5d62c4c7abced1076710f9bc2d8847433 (patch)
treedd5dc21961f6b4aef6900b0c2eb63ce7c70aecd5 /drivers/media/video/bw-qcam.c
parent538f9630afbbe429ecbcdcf92536200293a8e4b3 (diff)
downloadkernel_samsung_smdk4412-3593cab5d62c4c7abced1076710f9bc2d8847433.zip
kernel_samsung_smdk4412-3593cab5d62c4c7abced1076710f9bc2d8847433.tar.gz
kernel_samsung_smdk4412-3593cab5d62c4c7abced1076710f9bc2d8847433.tar.bz2
V4L/DVB (3318b): sem2mutex: drivers/media/, #2
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/bw-qcam.c')
-rw-r--r--drivers/media/video/bw-qcam.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/bw-qcam.c b/drivers/media/video/bw-qcam.c
index 6bad93e..d97b7d8 100644
--- a/drivers/media/video/bw-qcam.c
+++ b/drivers/media/video/bw-qcam.c
@@ -73,7 +73,7 @@ OTHER DEALINGS IN THE SOFTWARE.
#include <linux/parport.h>
#include <linux/sched.h>
#include <linux/videodev.h>
-#include <asm/semaphore.h>
+#include <linux/mutex.h>
#include <asm/uaccess.h>
#include "bw-qcam.h"
@@ -168,7 +168,7 @@ static struct qcam_device *qcam_init(struct parport *port)
memcpy(&q->vdev, &qcam_template, sizeof(qcam_template));
- init_MUTEX(&q->lock);
+ mutex_init(&q->lock);
q->port_mode = (QC_ANY | QC_NOTSET);
q->width = 320;
@@ -772,9 +772,9 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file,
qcam->whitebal = p->whiteness>>8;
qcam->bpp = p->depth;
- down(&qcam->lock);
+ mutex_lock(&qcam->lock);
qc_setscanmode(qcam);
- up(&qcam->lock);
+ mutex_unlock(&qcam->lock);
qcam->status |= QC_PARAM_CHANGE;
return 0;
@@ -805,9 +805,9 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file,
qcam->height = 240;
qcam->transfer_scale = 1;
}
- down(&qcam->lock);
+ mutex_lock(&qcam->lock);
qc_setscanmode(qcam);
- up(&qcam->lock);
+ mutex_unlock(&qcam->lock);
/* We must update the camera before we grab. We could
just have changed the grab size */
@@ -854,7 +854,7 @@ static ssize_t qcam_read(struct file *file, char __user *buf,
int len;
parport_claim_or_block(qcam->pdev);
- down(&qcam->lock);
+ mutex_lock(&qcam->lock);
qc_reset(qcam);
@@ -864,7 +864,7 @@ static ssize_t qcam_read(struct file *file, char __user *buf,
len=qc_capture(qcam, buf,count);
- up(&qcam->lock);
+ mutex_unlock(&qcam->lock);
parport_release(qcam->pdev);
return len;