aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/ivtv/ivtv-queue.c4
-rw-r--r--drivers/media/video/videobuf-core.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/video/ivtv/ivtv-queue.c b/drivers/media/video/ivtv/ivtv-queue.c
index 39a216713244..3e1deec67a5e 100644
--- a/drivers/media/video/ivtv/ivtv-queue.c
+++ b/drivers/media/video/ivtv/ivtv-queue.c
@@ -51,7 +51,7 @@ void ivtv_queue_init(struct ivtv_queue *q)
51 51
52void ivtv_enqueue(struct ivtv_stream *s, struct ivtv_buffer *buf, struct ivtv_queue *q) 52void ivtv_enqueue(struct ivtv_stream *s, struct ivtv_buffer *buf, struct ivtv_queue *q)
53{ 53{
54 unsigned long flags = 0; 54 unsigned long flags;
55 55
56 /* clear the buffer if it is going to be enqueued to the free queue */ 56 /* clear the buffer if it is going to be enqueued to the free queue */
57 if (q == &s->q_free) { 57 if (q == &s->q_free) {
@@ -71,7 +71,7 @@ void ivtv_enqueue(struct ivtv_stream *s, struct ivtv_buffer *buf, struct ivtv_qu
71struct ivtv_buffer *ivtv_dequeue(struct ivtv_stream *s, struct ivtv_queue *q) 71struct ivtv_buffer *ivtv_dequeue(struct ivtv_stream *s, struct ivtv_queue *q)
72{ 72{
73 struct ivtv_buffer *buf = NULL; 73 struct ivtv_buffer *buf = NULL;
74 unsigned long flags = 0; 74 unsigned long flags;
75 75
76 spin_lock_irqsave(&s->qlock, flags); 76 spin_lock_irqsave(&s->qlock, flags);
77 if (!list_empty(&q->list)) { 77 if (!list_empty(&q->list)) {
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c
index 137a1ff4a149..fe742fdfae07 100644
--- a/drivers/media/video/videobuf-core.c
+++ b/drivers/media/video/videobuf-core.c
@@ -742,14 +742,13 @@ ssize_t videobuf_read_one(struct videobuf_queue *q,
742{ 742{
743 enum v4l2_field field; 743 enum v4l2_field field;
744 unsigned long flags = 0; 744 unsigned long flags = 0;
745 unsigned size, nbufs; 745 unsigned size = 0, nbufs = 1;
746 int retval; 746 int retval;
747 747
748 MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS); 748 MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS);
749 749
750 mutex_lock(&q->vb_lock); 750 mutex_lock(&q->vb_lock);
751 751
752 nbufs = 1; size = 0;
753 q->ops->buf_setup(q, &nbufs, &size); 752 q->ops->buf_setup(q, &nbufs, &size);
754 753
755 if (NULL == q->read_buf && 754 if (NULL == q->read_buf &&