diff options
Diffstat (limited to 'drivers/media/video/cx18/cx18-queue.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-queue.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/cx18/cx18-queue.c b/drivers/media/video/cx18/cx18-queue.c index bc4c5e4a6c03..b9bd4ff5535e 100644 --- a/drivers/media/video/cx18/cx18-queue.c +++ b/drivers/media/video/cx18/cx18-queue.c | |||
@@ -194,7 +194,7 @@ int cx18_stream_alloc(struct cx18_stream *s) | |||
194 | s->name, s->buffers, s->buf_size, | 194 | s->name, s->buffers, s->buf_size, |
195 | s->buffers * s->buf_size / 1024); | 195 | s->buffers * s->buf_size / 1024); |
196 | 196 | ||
197 | if (((char __iomem *)&cx->scb->cpu_mdl[cx->mdl_offset + s->buffers] - | 197 | if (((char __iomem *)&cx->scb->cpu_mdl[cx->free_mdl_idx + s->buffers] - |
198 | (char __iomem *)cx->scb) > SCB_RESERVED_SIZE) { | 198 | (char __iomem *)cx->scb) > SCB_RESERVED_SIZE) { |
199 | unsigned bufsz = (((char __iomem *)cx->scb) + SCB_RESERVED_SIZE - | 199 | unsigned bufsz = (((char __iomem *)cx->scb) + SCB_RESERVED_SIZE - |
200 | ((char __iomem *)cx->scb->cpu_mdl)); | 200 | ((char __iomem *)cx->scb->cpu_mdl)); |
@@ -205,7 +205,7 @@ int cx18_stream_alloc(struct cx18_stream *s) | |||
205 | return -ENOMEM; | 205 | return -ENOMEM; |
206 | } | 206 | } |
207 | 207 | ||
208 | s->mdl_offset = cx->mdl_offset; | 208 | s->mdl_base_idx = cx->free_mdl_idx; |
209 | 209 | ||
210 | /* allocate stream buffers. Initially all buffers are in q_free. */ | 210 | /* allocate stream buffers. Initially all buffers are in q_free. */ |
211 | for (i = 0; i < s->buffers; i++) { | 211 | for (i = 0; i < s->buffers; i++) { |
@@ -227,7 +227,7 @@ int cx18_stream_alloc(struct cx18_stream *s) | |||
227 | cx18_enqueue(s, buf, &s->q_free); | 227 | cx18_enqueue(s, buf, &s->q_free); |
228 | } | 228 | } |
229 | if (i == s->buffers) { | 229 | if (i == s->buffers) { |
230 | cx->mdl_offset += s->buffers; | 230 | cx->free_mdl_idx += s->buffers; |
231 | return 0; | 231 | return 0; |
232 | } | 232 | } |
233 | CX18_ERR("Couldn't allocate buffers for %s stream\n", s->name); | 233 | CX18_ERR("Couldn't allocate buffers for %s stream\n", s->name); |