diff options
Diffstat (limited to 'drivers/media/video/arv.c')
-rw-r--r-- | drivers/media/video/arv.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/arv.c b/drivers/media/video/arv.c index 994b75fe165a..c586f64b6b7f 100644 --- a/drivers/media/video/arv.c +++ b/drivers/media/video/arv.c | |||
@@ -31,8 +31,8 @@ | |||
31 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
32 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
33 | #include <linux/videodev.h> | 33 | #include <linux/videodev.h> |
34 | #include <linux/mutex.h> | ||
34 | 35 | ||
35 | #include <asm/semaphore.h> | ||
36 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
37 | #include <asm/m32r.h> | 37 | #include <asm/m32r.h> |
38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
@@ -117,7 +117,7 @@ struct ar_device { | |||
117 | int width, height; | 117 | int width, height; |
118 | int frame_bytes, line_bytes; | 118 | int frame_bytes, line_bytes; |
119 | wait_queue_head_t wait; | 119 | wait_queue_head_t wait; |
120 | struct semaphore lock; | 120 | struct mutex lock; |
121 | }; | 121 | }; |
122 | 122 | ||
123 | static int video_nr = -1; /* video device number (first free) */ | 123 | static int video_nr = -1; /* video device number (first free) */ |
@@ -288,7 +288,7 @@ static ssize_t ar_read(struct file *file, char *buf, size_t count, loff_t *ppos) | |||
288 | if (ar->mode == AR_MODE_NORMAL) | 288 | if (ar->mode == AR_MODE_NORMAL) |
289 | arvcr1 |= ARVCR1_NORMAL; | 289 | arvcr1 |= ARVCR1_NORMAL; |
290 | 290 | ||
291 | down(&ar->lock); | 291 | mutex_lock(&ar->lock); |
292 | 292 | ||
293 | #if USE_INT | 293 | #if USE_INT |
294 | local_irq_save(flags); | 294 | local_irq_save(flags); |
@@ -392,7 +392,7 @@ static ssize_t ar_read(struct file *file, char *buf, size_t count, loff_t *ppos) | |||
392 | } | 392 | } |
393 | DEBUG(1, "ret = %d\n", ret); | 393 | DEBUG(1, "ret = %d\n", ret); |
394 | out_up: | 394 | out_up: |
395 | up(&ar->lock); | 395 | mutex_unlock(&ar->lock); |
396 | return ret; | 396 | return ret; |
397 | } | 397 | } |
398 | 398 | ||
@@ -456,7 +456,7 @@ static int ar_do_ioctl(struct inode *inode, struct file *file, | |||
456 | (w->width != AR_WIDTH_QVGA || w->height != AR_HEIGHT_QVGA)) | 456 | (w->width != AR_WIDTH_QVGA || w->height != AR_HEIGHT_QVGA)) |
457 | return -EINVAL; | 457 | return -EINVAL; |
458 | 458 | ||
459 | down(&ar->lock); | 459 | mutex_lock(&ar->lock); |
460 | ar->width = w->width; | 460 | ar->width = w->width; |
461 | ar->height = w->height; | 461 | ar->height = w->height; |
462 | if (ar->width == AR_WIDTH_VGA) { | 462 | if (ar->width == AR_WIDTH_VGA) { |
@@ -473,7 +473,7 @@ static int ar_do_ioctl(struct inode *inode, struct file *file, | |||
473 | ar->line_bytes = AR_LINE_BYTES_QVGA; | 473 | ar->line_bytes = AR_LINE_BYTES_QVGA; |
474 | ar->mode = AR_MODE_INTERLACE; | 474 | ar->mode = AR_MODE_INTERLACE; |
475 | } | 475 | } |
476 | up(&ar->lock); | 476 | mutex_unlock(&ar->lock); |
477 | return 0; | 477 | return 0; |
478 | } | 478 | } |
479 | case VIDIOCGFBUF: | 479 | case VIDIOCGFBUF: |
@@ -734,7 +734,7 @@ static int ar_initialize(struct video_device *dev) | |||
734 | void ar_release(struct video_device *vfd) | 734 | void ar_release(struct video_device *vfd) |
735 | { | 735 | { |
736 | struct ar_device *ar = vfd->priv; | 736 | struct ar_device *ar = vfd->priv; |
737 | down(&ar->lock); | 737 | mutex_lock(&ar->lock); |
738 | video_device_release(vfd); | 738 | video_device_release(vfd); |
739 | } | 739 | } |
740 | 740 | ||
@@ -824,7 +824,7 @@ static int __init ar_init(void) | |||
824 | ar->line_bytes = AR_LINE_BYTES_QVGA; | 824 | ar->line_bytes = AR_LINE_BYTES_QVGA; |
825 | ar->mode = AR_MODE_INTERLACE; | 825 | ar->mode = AR_MODE_INTERLACE; |
826 | } | 826 | } |
827 | init_MUTEX(&ar->lock); | 827 | mutex_init(&ar->lock); |
828 | init_waitqueue_head(&ar->wait); | 828 | init_waitqueue_head(&ar->wait); |
829 | 829 | ||
830 | #if USE_INT | 830 | #if USE_INT |