diff options
Diffstat (limited to 'drivers/media/video/cx18/cx18-streams.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-streams.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/video/cx18/cx18-streams.c b/drivers/media/video/cx18/cx18-streams.c index bbeb01c5cf32..e1934e9cfdc8 100644 --- a/drivers/media/video/cx18/cx18-streams.c +++ b/drivers/media/video/cx18/cx18-streams.c | |||
@@ -116,11 +116,13 @@ static void cx18_stream_init(struct cx18 *cx, int type) | |||
116 | s->buffers = cx->stream_buffers[type]; | 116 | s->buffers = cx->stream_buffers[type]; |
117 | s->buf_size = cx->stream_buf_size[type]; | 117 | s->buf_size = cx->stream_buf_size[type]; |
118 | 118 | ||
119 | mutex_init(&s->qlock); | ||
120 | init_waitqueue_head(&s->waitq); | 119 | init_waitqueue_head(&s->waitq); |
121 | s->id = -1; | 120 | s->id = -1; |
121 | spin_lock_init(&s->q_free.lock); | ||
122 | cx18_queue_init(&s->q_free); | 122 | cx18_queue_init(&s->q_free); |
123 | spin_lock_init(&s->q_busy.lock); | ||
123 | cx18_queue_init(&s->q_busy); | 124 | cx18_queue_init(&s->q_busy); |
125 | spin_lock_init(&s->q_full.lock); | ||
124 | cx18_queue_init(&s->q_full); | 126 | cx18_queue_init(&s->q_full); |
125 | } | 127 | } |
126 | 128 | ||
@@ -685,13 +687,13 @@ int cx18_start_v4l2_encode_stream(struct cx18_stream *s) | |||
685 | 687 | ||
686 | /* Init all the cpu_mdls for this stream */ | 688 | /* Init all the cpu_mdls for this stream */ |
687 | cx18_flush_queues(s); | 689 | cx18_flush_queues(s); |
688 | mutex_lock(&s->qlock); | 690 | spin_lock(&s->q_free.lock); |
689 | list_for_each_entry(buf, &s->q_free.list, list) { | 691 | list_for_each_entry(buf, &s->q_free.list, list) { |
690 | cx18_writel(cx, buf->dma_handle, | 692 | cx18_writel(cx, buf->dma_handle, |
691 | &cx->scb->cpu_mdl[buf->id].paddr); | 693 | &cx->scb->cpu_mdl[buf->id].paddr); |
692 | cx18_writel(cx, s->buf_size, &cx->scb->cpu_mdl[buf->id].length); | 694 | cx18_writel(cx, s->buf_size, &cx->scb->cpu_mdl[buf->id].length); |
693 | } | 695 | } |
694 | mutex_unlock(&s->qlock); | 696 | spin_unlock(&s->q_free.lock); |
695 | _cx18_stream_load_fw_queue(s); | 697 | _cx18_stream_load_fw_queue(s); |
696 | 698 | ||
697 | /* begin_capture */ | 699 | /* begin_capture */ |