summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-streams.c
diff options
context:
space:
mode:
authorSimon Farnsworth <simon.farnsworth@onelan.co.uk>2011-05-10 10:49:50 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 20:21:27 -0300
commit612031c0771def54dd202cef76bb9bd654e47b5b (patch)
treedf8d294ba25d0ad6aa21d6cfecc88977d6a0e9b8 /drivers/media/video/cx18/cx18-streams.c
parentd9c417b5a462d9d0392d91bb73d9a1a16bb2959a (diff)
downloadtalos-op-linux-612031c0771def54dd202cef76bb9bd654e47b5b.tar.gz
talos-op-linux-612031c0771def54dd202cef76bb9bd654e47b5b.zip
[media] cx18: Move spinlock and vb_type initialisation into stream_init
The initialisation of vb_type in serialized_open was preventing REQBUFS from working reliably. Remove it, and move the spinlock into stream_init for good measure - it's only used when we have a stream that supports videobuf anyway. Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-streams.c')
-rw-r--r--drivers/media/video/cx18/cx18-streams.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/cx18/cx18-streams.c b/drivers/media/video/cx18/cx18-streams.c
index 3995af71b820..852f420fd271 100644
--- a/drivers/media/video/cx18/cx18-streams.c
+++ b/drivers/media/video/cx18/cx18-streams.c
@@ -275,6 +275,8 @@ static void cx18_stream_init(struct cx18 *cx, int type)
init_timer(&s->vb_timeout);
spin_lock_init(&s->vb_lock);
if (type == CX18_ENC_STREAM_TYPE_YUV) {
+ spin_lock_init(&s->vbuf_q_lock);
+
s->vb_type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
videobuf_queue_vmalloc_init(&s->vbuf_q, &cx18_videobuf_qops,
&cx->pci_dev->dev, &s->vbuf_q_lock,
OpenPOWER on IntegriCloud