summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx18/cx18-streams.c
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2008-12-14 16:52:12 -0500
committerAndy Walls <awalls@radix.net>2008-12-14 16:52:12 -0500
commitd06ed8475f6edc68d8aee44a9e8c9cf0e87e29ef (patch)
tree301c2db36be1b7608bcd86282bc9753678376f18 /linux/drivers/media/video/cx18/cx18-streams.c
parent66c33fb391b11fa484e3a4f6ba4275be3cd2f4dd (diff)
downloadmediapointer-dvb-s2-d06ed8475f6edc68d8aee44a9e8c9cf0e87e29ef.tar.gz
mediapointer-dvb-s2-d06ed8475f6edc68d8aee44a9e8c9cf0e87e29ef.tar.bz2
cx18 Replace magic number 63 with CX18_MAX_FW_MDLS_PER_STREAM
From: Andy Walls <awalls@radix.net> 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 <awalls@radix.net>
Diffstat (limited to 'linux/drivers/media/video/cx18/cx18-streams.c')
-rw-r--r--linux/drivers/media/video/cx18/cx18-streams.c5
1 files changed, 3 insertions, 2 deletions
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)