diff options
author | Andy Walls <awalls@radix.net> | 2009-11-05 19:51:24 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-05 15:41:51 -0500 |
commit | fa655dda5ce6e5ac4a9b94fd451358edca2ddab8 (patch) | |
tree | af569072c8935bf4625ddc3fc195ca7c170174f8 | |
parent | c37b11bf17b66b960b217c35283aa9c55eacb292 (diff) |
V4L/DVB (13428): cx18: Rename mdl_offset to mdl_base_idx or free_mdl_idx as appropriate
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/cx18/cx18-driver.h | 4 | ||||
-rw-r--r-- | drivers/media/video/cx18/cx18-mailbox.c | 4 | ||||
-rw-r--r-- | drivers/media/video/cx18/cx18-queue.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.h b/drivers/media/video/cx18/cx18-driver.h index 0b182fa2ad0..1a899e0773d 100644 --- a/drivers/media/video/cx18/cx18-driver.h +++ b/drivers/media/video/cx18/cx18-driver.h | |||
@@ -337,7 +337,7 @@ struct cx18_stream { | |||
337 | const char *name; /* name of the stream */ | 337 | const char *name; /* name of the stream */ |
338 | int type; /* stream type */ | 338 | int type; /* stream type */ |
339 | u32 handle; /* task handle */ | 339 | u32 handle; /* task handle */ |
340 | unsigned mdl_offset; | 340 | unsigned int mdl_base_idx; |
341 | 341 | ||
342 | u32 id; | 342 | u32 id; |
343 | unsigned long s_flags; /* status flags, see above */ | 343 | unsigned long s_flags; /* status flags, see above */ |
@@ -514,7 +514,7 @@ struct cx18 { | |||
514 | u16 buffer_id; /* buffer ID counter */ | 514 | u16 buffer_id; /* buffer ID counter */ |
515 | u32 v4l2_cap; /* V4L2 capabilities of card */ | 515 | u32 v4l2_cap; /* V4L2 capabilities of card */ |
516 | u32 hw_flags; /* Hardware description of the board */ | 516 | u32 hw_flags; /* Hardware description of the board */ |
517 | unsigned mdl_offset; | 517 | unsigned int free_mdl_idx; |
518 | struct cx18_scb __iomem *scb; /* pointer to SCB */ | 518 | struct cx18_scb __iomem *scb; /* pointer to SCB */ |
519 | struct mutex epu2apu_mb_lock; /* protect driver to chip mailbox in SCB*/ | 519 | struct mutex epu2apu_mb_lock; /* protect driver to chip mailbox in SCB*/ |
520 | struct mutex epu2cpu_mb_lock; /* protect driver to chip mailbox in SCB*/ | 520 | struct mutex epu2cpu_mb_lock; /* protect driver to chip mailbox in SCB*/ |
diff --git a/drivers/media/video/cx18/cx18-mailbox.c b/drivers/media/video/cx18/cx18-mailbox.c index afe46c3d405..4a1249a7d46 100644 --- a/drivers/media/video/cx18/cx18-mailbox.c +++ b/drivers/media/video/cx18/cx18-mailbox.c | |||
@@ -178,8 +178,8 @@ static void epu_dma_done(struct cx18 *cx, struct cx18_in_work_order *order) | |||
178 | * and send them back to q_free for fw rotation eventually. | 178 | * and send them back to q_free for fw rotation eventually. |
179 | */ | 179 | */ |
180 | if ((order->flags & CX18_F_EWO_MB_STALE_UPON_RECEIPT) && | 180 | if ((order->flags & CX18_F_EWO_MB_STALE_UPON_RECEIPT) && |
181 | !(id >= s->mdl_offset && | 181 | !(id >= s->mdl_base_idx && |
182 | id < (s->mdl_offset + s->buffers))) { | 182 | id < (s->mdl_base_idx + s->buffers))) { |
183 | CX18_WARN("Fell behind! Ignoring stale mailbox with " | 183 | CX18_WARN("Fell behind! Ignoring stale mailbox with " |
184 | " inconsistent data. Lost buffer for mailbox " | 184 | " inconsistent data. Lost buffer for mailbox " |
185 | "seq no %d\n", mb->request); | 185 | "seq no %d\n", mb->request); |
diff --git a/drivers/media/video/cx18/cx18-queue.c b/drivers/media/video/cx18/cx18-queue.c index bc4c5e4a6c0..b9bd4ff5535 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); |