diff options
author | Andy Walls <awalls@radix.net> | 2008-08-22 20:55:54 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 09:36:53 -0200 |
commit | 59ba2b002265f2e862aa7f0df3f13c09ea99c4da (patch) | |
tree | 308a5ed9334d267db054fd6675f61bbc6fce69bf /drivers/media/video/cx18/cx18-queue.c | |
parent | a928880a5b65aa64bbbac880cdc65de85827ba20 (diff) |
V4L/DVB (8771): cx18: Remove redundant struct cx18_queue length member.
cx18: Remove redundant struct cx18_queue length member. It can be trivially
computed from queue->buffers * stream->buf_size, if ever really needed.
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-queue.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-queue.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/media/video/cx18/cx18-queue.c b/drivers/media/video/cx18/cx18-queue.c index dbe792ac300..4f3bd43ba80 100644 --- a/drivers/media/video/cx18/cx18-queue.c +++ b/drivers/media/video/cx18/cx18-queue.c @@ -38,7 +38,6 @@ void cx18_queue_init(struct cx18_queue *q) { INIT_LIST_HEAD(&q->list); q->buffers = 0; - q->length = 0; q->bytesused = 0; } @@ -56,7 +55,6 @@ void cx18_enqueue(struct cx18_stream *s, struct cx18_buffer *buf, spin_lock_irqsave(&s->qlock, flags); list_add_tail(&buf->list, &q->list); q->buffers++; - q->length += s->buf_size; q->bytesused += buf->bytesused - buf->readpos; spin_unlock_irqrestore(&s->qlock, flags); } @@ -71,7 +69,6 @@ struct cx18_buffer *cx18_dequeue(struct cx18_stream *s, struct cx18_queue *q) buf = list_entry(q->list.next, struct cx18_buffer, list); list_del_init(q->list.next); q->buffers--; - q->length -= s->buf_size; q->bytesused -= buf->bytesused - buf->readpos; } spin_unlock_irqrestore(&s->qlock, flags); @@ -96,9 +93,7 @@ struct cx18_buffer *cx18_queue_get_buf_irq(struct cx18_stream *s, u32 id, they are not moved to the full queue */ if (s->type != CX18_ENC_STREAM_TYPE_TS) { s->q_free.buffers--; - s->q_free.length -= s->buf_size; s->q_full.buffers++; - s->q_full.length += s->buf_size; s->q_full.bytesused += buf->bytesused; list_move_tail(&buf->list, &s->q_full.list); } @@ -125,7 +120,6 @@ static void cx18_queue_flush(struct cx18_stream *s, struct cx18_queue *q) list_move_tail(q->list.next, &s->q_free.list); buf->bytesused = buf->readpos = buf->b_flags = 0; s->q_free.buffers++; - s->q_free.length += s->buf_size; } cx18_queue_init(q); spin_unlock_irqrestore(&s->qlock, flags); |