Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223385
b: refs/heads/master
c: 6975669
h: refs/heads/master
i:
  223383: 2144455
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Dec 1, 2010
1 parent 90c5293 commit 17760ec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 20aa5bb9dc4b5aba1b4d0f15aa92c4e83721a343
refs/heads/master: 697566939dc60048fca6e6dd69c7e089aaeb7ff8
13 changes: 8 additions & 5 deletions trunk/drivers/media/video/sh_vou.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ struct sh_vou_device {
int pix_idx;
struct videobuf_buffer *active;
enum sh_vou_status status;
struct mutex fop_lock;
};

struct sh_vou_file {
Expand Down Expand Up @@ -235,7 +236,7 @@ static void free_buffer(struct videobuf_queue *vq, struct videobuf_buffer *vb)
vb->state = VIDEOBUF_NEEDS_INIT;
}

/* Locking: caller holds vq->vb_lock mutex */
/* Locking: caller holds fop_lock mutex */
static int sh_vou_buf_setup(struct videobuf_queue *vq, unsigned int *count,
unsigned int *size)
{
Expand All @@ -257,7 +258,7 @@ static int sh_vou_buf_setup(struct videobuf_queue *vq, unsigned int *count,
return 0;
}

/* Locking: caller holds vq->vb_lock mutex */
/* Locking: caller holds fop_lock mutex */
static int sh_vou_buf_prepare(struct videobuf_queue *vq,
struct videobuf_buffer *vb,
enum v4l2_field field)
Expand Down Expand Up @@ -306,7 +307,7 @@ static int sh_vou_buf_prepare(struct videobuf_queue *vq,
return 0;
}

/* Locking: caller holds vq->vb_lock mutex and vq->irqlock spinlock */
/* Locking: caller holds fop_lock mutex and vq->irqlock spinlock */
static void sh_vou_buf_queue(struct videobuf_queue *vq,
struct videobuf_buffer *vb)
{
Expand Down Expand Up @@ -1190,7 +1191,7 @@ static int sh_vou_open(struct file *file)
V4L2_BUF_TYPE_VIDEO_OUTPUT,
V4L2_FIELD_NONE,
sizeof(struct videobuf_buffer), vdev,
NULL);
&vou_dev->fop_lock);

return 0;
}
Expand Down Expand Up @@ -1292,7 +1293,7 @@ static const struct v4l2_file_operations sh_vou_fops = {
.owner = THIS_MODULE,
.open = sh_vou_open,
.release = sh_vou_release,
.ioctl = video_ioctl2,
.unlocked_ioctl = video_ioctl2,
.mmap = sh_vou_mmap,
.poll = sh_vou_poll,
};
Expand Down Expand Up @@ -1331,6 +1332,7 @@ static int __devinit sh_vou_probe(struct platform_device *pdev)

INIT_LIST_HEAD(&vou_dev->queue);
spin_lock_init(&vou_dev->lock);
mutex_init(&vou_dev->fop_lock);
atomic_set(&vou_dev->use_count, 0);
vou_dev->pdata = vou_pdata;
vou_dev->status = SH_VOU_IDLE;
Expand Down Expand Up @@ -1388,6 +1390,7 @@ static int __devinit sh_vou_probe(struct platform_device *pdev)
vdev->tvnorms |= V4L2_STD_PAL;
vdev->v4l2_dev = &vou_dev->v4l2_dev;
vdev->release = video_device_release;
vdev->lock = &vou_dev->fop_lock;

vou_dev->vdev = vdev;
video_set_drvdata(vdev, vou_dev);
Expand Down

0 comments on commit 17760ec

Please sign in to comment.