diff options
| author | Ingo Molnar <mingo@elte.hu> | 2006-02-07 03:49:14 -0500 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-02-07 03:49:14 -0500 |
| commit | 3593cab5d62c4c7abced1076710f9bc2d8847433 (patch) | |
| tree | dd5dc21961f6b4aef6900b0c2eb63ce7c70aecd5 /drivers/media/video/arv.c | |
| parent | 538f9630afbbe429ecbcdcf92536200293a8e4b3 (diff) | |
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/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 994b75fe165..c586f64b6b7 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 |
