From d06ed8475f6edc68d8aee44a9e8c9cf0e87e29ef Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Sun, 14 Dec 2008 16:52:12 -0500 Subject: cx18 Replace magic number 63 with CX18_MAX_FW_MDLS_PER_STREAM From: Andy Walls Removed magic number that referred to firmware limit on the number of MDLs the firmware can maintain for any stream at any one time. Priority: normal Signed-off-by: Andy Walls --- linux/drivers/media/video/cx18/cx18-streams.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'linux/drivers/media/video/cx18/cx18-streams.c') diff --git a/linux/drivers/media/video/cx18/cx18-streams.c b/linux/drivers/media/video/cx18/cx18-streams.c index 9ed542624..acaf774d8 100644 --- a/linux/drivers/media/video/cx18/cx18-streams.c +++ b/linux/drivers/media/video/cx18/cx18-streams.c @@ -425,7 +425,7 @@ void cx18_stream_load_fw_queue(struct cx18_stream *s) struct cx18_buffer *buf; if (atomic_read(&s->q_free.buffers) == 0 || - atomic_read(&s->q_busy.buffers) >= 63) + atomic_read(&s->q_busy.buffers) >= CX18_MAX_FW_MDLS_PER_STREAM) return; /* Move from q_free to q_busy notifying the firmware, until the limit */ @@ -434,7 +434,8 @@ void cx18_stream_load_fw_queue(struct cx18_stream *s) if (buf == NULL) break; q = cx18_stream_put_buf_fw(s, buf); - } while (atomic_read(&s->q_busy.buffers) < 63 && q == &s->q_busy); + } while (atomic_read(&s->q_busy.buffers) < CX18_MAX_FW_MDLS_PER_STREAM + && q == &s->q_busy); } int cx18_start_v4l2_encode_stream(struct cx18_stream *s) -- cgit v1.2.3