V4L/DVB (9891): cx18 Replace magic number 63 with CX18_MAX_FW_MDLS_PER_STREAM
Removed magic number that referred to firmware limit on the number of
MDLs the firmware can maintain for any stream at any one time.
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-streams.c b/drivers/media/video/cx18/cx18-streams.c
index 985bad8..8fc655d 100644
--- a/drivers/media/video/cx18/cx18-streams.c
+++ b/drivers/media/video/cx18/cx18-streams.c
@@ -425,7 +425,7 @@
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 @@
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)