diff options
Diffstat (limited to 'drivers/media/video/bw-qcam.c')
-rw-r--r-- | drivers/media/video/bw-qcam.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/bw-qcam.c b/drivers/media/video/bw-qcam.c index 6bad93ef969f..d97b7d8ac33d 100644 --- a/drivers/media/video/bw-qcam.c +++ b/drivers/media/video/bw-qcam.c | |||
@@ -73,7 +73,7 @@ OTHER DEALINGS IN THE SOFTWARE. | |||
73 | #include <linux/parport.h> | 73 | #include <linux/parport.h> |
74 | #include <linux/sched.h> | 74 | #include <linux/sched.h> |
75 | #include <linux/videodev.h> | 75 | #include <linux/videodev.h> |
76 | #include <asm/semaphore.h> | 76 | #include <linux/mutex.h> |
77 | #include <asm/uaccess.h> | 77 | #include <asm/uaccess.h> |
78 | 78 | ||
79 | #include "bw-qcam.h" | 79 | #include "bw-qcam.h" |
@@ -168,7 +168,7 @@ static struct qcam_device *qcam_init(struct parport *port) | |||
168 | 168 | ||
169 | memcpy(&q->vdev, &qcam_template, sizeof(qcam_template)); | 169 | memcpy(&q->vdev, &qcam_template, sizeof(qcam_template)); |
170 | 170 | ||
171 | init_MUTEX(&q->lock); | 171 | mutex_init(&q->lock); |
172 | 172 | ||
173 | q->port_mode = (QC_ANY | QC_NOTSET); | 173 | q->port_mode = (QC_ANY | QC_NOTSET); |
174 | q->width = 320; | 174 | q->width = 320; |
@@ -772,9 +772,9 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file, | |||
772 | qcam->whitebal = p->whiteness>>8; | 772 | qcam->whitebal = p->whiteness>>8; |
773 | qcam->bpp = p->depth; | 773 | qcam->bpp = p->depth; |
774 | 774 | ||
775 | down(&qcam->lock); | 775 | mutex_lock(&qcam->lock); |
776 | qc_setscanmode(qcam); | 776 | qc_setscanmode(qcam); |
777 | up(&qcam->lock); | 777 | mutex_unlock(&qcam->lock); |
778 | qcam->status |= QC_PARAM_CHANGE; | 778 | qcam->status |= QC_PARAM_CHANGE; |
779 | 779 | ||
780 | return 0; | 780 | return 0; |
@@ -805,9 +805,9 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file, | |||
805 | qcam->height = 240; | 805 | qcam->height = 240; |
806 | qcam->transfer_scale = 1; | 806 | qcam->transfer_scale = 1; |
807 | } | 807 | } |
808 | down(&qcam->lock); | 808 | mutex_lock(&qcam->lock); |
809 | qc_setscanmode(qcam); | 809 | qc_setscanmode(qcam); |
810 | up(&qcam->lock); | 810 | mutex_unlock(&qcam->lock); |
811 | 811 | ||
812 | /* We must update the camera before we grab. We could | 812 | /* We must update the camera before we grab. We could |
813 | just have changed the grab size */ | 813 | just have changed the grab size */ |
@@ -854,7 +854,7 @@ static ssize_t qcam_read(struct file *file, char __user *buf, | |||
854 | int len; | 854 | int len; |
855 | parport_claim_or_block(qcam->pdev); | 855 | parport_claim_or_block(qcam->pdev); |
856 | 856 | ||
857 | down(&qcam->lock); | 857 | mutex_lock(&qcam->lock); |
858 | 858 | ||
859 | qc_reset(qcam); | 859 | qc_reset(qcam); |
860 | 860 | ||
@@ -864,7 +864,7 @@ static ssize_t qcam_read(struct file *file, char __user *buf, | |||
864 | 864 | ||
865 | len=qc_capture(qcam, buf,count); | 865 | len=qc_capture(qcam, buf,count); |
866 | 866 | ||
867 | up(&qcam->lock); | 867 | mutex_unlock(&qcam->lock); |
868 | 868 | ||
869 | parport_release(qcam->pdev); | 869 | parport_release(qcam->pdev); |
870 | return len; | 870 | return len; |