aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-fileops.c
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2008-11-27 22:04:21 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 06:38:28 -0500
commitb80e1074c734416987486b7b76b6479faa73f1e2 (patch)
tree4f1432c4755b9aa686dd8764a24e404eaa3a550e /drivers/media/video/cx18/cx18-fileops.c
parentbe2c6db122467c6b6b55d93dd08d89cb2ee7821c (diff)
V4L/DVB (9800): cx18: Eliminate q_io from stream buffer handling
Eliminate q_io from stream buffer handling in anticipation of upcoming changes in buffer handling. q_io was a holdover from ivtv and it's function in cx18 was trivial and not necessary. We just push things back onto the front of q_full now, instead of maintaining a 1 buffer q_io queue. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-fileops.c')
-rw-r--r--drivers/media/video/cx18/cx18-fileops.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/media/video/cx18/cx18-fileops.c b/drivers/media/video/cx18/cx18-fileops.c
index 2c8117510fb4..504a1f9edec6 100644
--- a/drivers/media/video/cx18/cx18-fileops.c
+++ b/drivers/media/video/cx18/cx18-fileops.c
@@ -195,11 +195,6 @@ static struct cx18_buffer *cx18_get_buffer(struct cx18_stream *s, int non_block,
195 return buf; 195 return buf;
196 } 196 }
197 197
198 /* do we have leftover data? */
199 buf = cx18_dequeue(s, &s->q_io);
200 if (buf)
201 return buf;
202
203 /* do we have new data? */ 198 /* do we have new data? */
204 buf = cx18_dequeue(s, &s->q_full); 199 buf = cx18_dequeue(s, &s->q_full);
205 if (buf) { 200 if (buf) {
@@ -375,7 +370,7 @@ static ssize_t cx18_read(struct cx18_stream *s, char __user *ubuf,
375 cx->enc_mem, 370 cx->enc_mem,
376 1, buf->id, s->buf_size); 371 1, buf->id, s->buf_size);
377 } else 372 } else
378 cx18_enqueue(s, buf, &s->q_io); 373 cx18_push(s, buf, &s->q_full);
379 } else if (buf->readpos == buf->bytesused) { 374 } else if (buf->readpos == buf->bytesused) {
380 int idx = cx->vbi.inserted_frame % CX18_VBI_FRAMES; 375 int idx = cx->vbi.inserted_frame % CX18_VBI_FRAMES;
381 376
@@ -519,7 +514,7 @@ unsigned int cx18_v4l2_enc_poll(struct file *filp, poll_table *wait)
519 CX18_DEBUG_HI_FILE("Encoder poll\n"); 514 CX18_DEBUG_HI_FILE("Encoder poll\n");
520 poll_wait(filp, &s->waitq, wait); 515 poll_wait(filp, &s->waitq, wait);
521 516
522 if (atomic_read(&s->q_full.buffers) || atomic_read(&s->q_io.buffers)) 517 if (atomic_read(&s->q_full.buffers))
523 return POLLIN | POLLRDNORM; 518 return POLLIN | POLLRDNORM;
524 if (eof) 519 if (eof)
525 return POLLHUP; 520 return POLLHUP;