diff options
author | Andy Walls <awalls@radix.net> | 2008-11-27 22:04:21 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:38:28 -0500 |
commit | b80e1074c734416987486b7b76b6479faa73f1e2 (patch) | |
tree | 4f1432c4755b9aa686dd8764a24e404eaa3a550e /drivers/media/video/cx18/cx18-queue.h | |
parent | be2c6db122467c6b6b55d93dd08d89cb2ee7821c (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-queue.h')
-rw-r--r-- | drivers/media/video/cx18/cx18-queue.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/media/video/cx18/cx18-queue.h b/drivers/media/video/cx18/cx18-queue.h index ff50a2b7e5bc..d184e55ce624 100644 --- a/drivers/media/video/cx18/cx18-queue.h +++ b/drivers/media/video/cx18/cx18-queue.h | |||
@@ -43,9 +43,24 @@ static inline void cx18_buf_sync_for_device(struct cx18_stream *s, | |||
43 | void cx18_buf_swap(struct cx18_buffer *buf); | 43 | void cx18_buf_swap(struct cx18_buffer *buf); |
44 | 44 | ||
45 | /* cx18_queue utility functions */ | 45 | /* cx18_queue utility functions */ |
46 | void cx18_queue_init(struct cx18_queue *q); | 46 | void _cx18_enqueue(struct cx18_stream *s, struct cx18_buffer *buf, |
47 | struct cx18_queue *q, int to_front); | ||
48 | |||
49 | static inline | ||
47 | void cx18_enqueue(struct cx18_stream *s, struct cx18_buffer *buf, | 50 | void cx18_enqueue(struct cx18_stream *s, struct cx18_buffer *buf, |
48 | struct cx18_queue *q); | 51 | struct cx18_queue *q) |
52 | { | ||
53 | _cx18_enqueue(s, buf, q, 0); /* FIFO */ | ||
54 | } | ||
55 | |||
56 | static inline | ||
57 | void cx18_push(struct cx18_stream *s, struct cx18_buffer *buf, | ||
58 | struct cx18_queue *q) | ||
59 | { | ||
60 | _cx18_enqueue(s, buf, q, 1); /* LIFO */ | ||
61 | } | ||
62 | |||
63 | void cx18_queue_init(struct cx18_queue *q); | ||
49 | struct cx18_buffer *cx18_dequeue(struct cx18_stream *s, struct cx18_queue *q); | 64 | struct cx18_buffer *cx18_dequeue(struct cx18_stream *s, struct cx18_queue *q); |
50 | struct cx18_buffer *cx18_queue_get_buf(struct cx18_stream *s, u32 id, | 65 | struct cx18_buffer *cx18_queue_get_buf(struct cx18_stream *s, u32 id, |
51 | u32 bytesused); | 66 | u32 bytesused); |