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>
diff --git a/drivers/media/video/cx18/cx18-queue.c b/drivers/media/video/cx18/cx18-queue.c
index 7b09c9a..fdfc83e 100644
--- a/drivers/media/video/cx18/cx18-queue.c
+++ b/drivers/media/video/cx18/cx18-queue.c
@@ -42,8 +42,8 @@
 	q->bytesused = 0;
 }
 
-void cx18_enqueue(struct cx18_stream *s, struct cx18_buffer *buf,
-		struct cx18_queue *q)
+void _cx18_enqueue(struct cx18_stream *s, struct cx18_buffer *buf,
+		   struct cx18_queue *q, int to_front)
 {
 	/* clear the buffer if it is going to be enqueued to the free queue */
 	if (q == &s->q_free) {
@@ -53,7 +53,10 @@
 		buf->skipped = 0;
 	}
 	mutex_lock(&s->qlock);
-	list_add_tail(&buf->list, &q->list);
+	if (to_front)
+		list_add(&buf->list, &q->list); /* LIFO */
+	else
+		list_add_tail(&buf->list, &q->list); /* FIFO */
 	atomic_inc(&q->buffers);
 	q->bytesused += buf->bytesused - buf->readpos;
 	mutex_unlock(&s->qlock);
@@ -159,7 +162,6 @@
 
 void cx18_flush_queues(struct cx18_stream *s)
 {
-	cx18_queue_flush(s, &s->q_io);
 	cx18_queue_flush(s, &s->q_full);
 }