diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2008-05-20 23:31:41 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-06-05 05:35:49 -0400 |
commit | b0510f8dc73dce56f35337487c6374ae84b15446 (patch) | |
tree | 776c3239d0f4955399021d1c486c577b8406979c /drivers/media/video | |
parent | d4f979a9e1c5c8ed291e89ec38248823c9a182ba (diff) |
V4L/DVB (7963): ivtv: trivial annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.h | 10 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-fileops.c | 2 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-irq.c | 8 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-queue.c | 2 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-yuv.c | 2 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-yuv.h | 2 |
6 files changed, 16 insertions, 10 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h index ba06e813c58c..9d23b1efd36d 100644 --- a/drivers/media/video/ivtv/ivtv-driver.h +++ b/drivers/media/video/ivtv/ivtv-driver.h | |||
@@ -259,6 +259,12 @@ struct ivtv_mailbox_data { | |||
259 | 259 | ||
260 | /* Scatter-Gather array element, used in DMA transfers */ | 260 | /* Scatter-Gather array element, used in DMA transfers */ |
261 | struct ivtv_sg_element { | 261 | struct ivtv_sg_element { |
262 | __le32 src; | ||
263 | __le32 dst; | ||
264 | __le32 size; | ||
265 | }; | ||
266 | |||
267 | struct ivtv_sg_host_element { | ||
262 | u32 src; | 268 | u32 src; |
263 | u32 dst; | 269 | u32 dst; |
264 | u32 size; | 270 | u32 size; |
@@ -349,8 +355,8 @@ struct ivtv_stream { | |||
349 | u16 dma_xfer_cnt; | 355 | u16 dma_xfer_cnt; |
350 | 356 | ||
351 | /* Base Dev SG Array for cx23415/6 */ | 357 | /* Base Dev SG Array for cx23415/6 */ |
352 | struct ivtv_sg_element *sg_pending; | 358 | struct ivtv_sg_host_element *sg_pending; |
353 | struct ivtv_sg_element *sg_processing; | 359 | struct ivtv_sg_host_element *sg_processing; |
354 | struct ivtv_sg_element *sg_dma; | 360 | struct ivtv_sg_element *sg_dma; |
355 | dma_addr_t sg_handle; | 361 | dma_addr_t sg_handle; |
356 | int sg_pending_size; | 362 | int sg_pending_size; |
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c index f2fa434b677b..db813e071ce6 100644 --- a/drivers/media/video/ivtv/ivtv-fileops.c +++ b/drivers/media/video/ivtv/ivtv-fileops.c | |||
@@ -587,7 +587,7 @@ retry: | |||
587 | since we may get here before the stream has been fully set-up */ | 587 | since we may get here before the stream has been fully set-up */ |
588 | if (mode == OUT_YUV && s->q_full.length == 0 && itv->dma_data_req_size) { | 588 | if (mode == OUT_YUV && s->q_full.length == 0 && itv->dma_data_req_size) { |
589 | while (count >= itv->dma_data_req_size) { | 589 | while (count >= itv->dma_data_req_size) { |
590 | if (!ivtv_yuv_udma_stream_frame (itv, (void *)user_buf)) { | 590 | if (!ivtv_yuv_udma_stream_frame (itv, (void __user *)user_buf)) { |
591 | bytes_written += itv->dma_data_req_size; | 591 | bytes_written += itv->dma_data_req_size; |
592 | user_buf += itv->dma_data_req_size; | 592 | user_buf += itv->dma_data_req_size; |
593 | count -= itv->dma_data_req_size; | 593 | count -= itv->dma_data_req_size; |
diff --git a/drivers/media/video/ivtv/ivtv-irq.c b/drivers/media/video/ivtv/ivtv-irq.c index d8ba3a4a8761..fba150a6cd23 100644 --- a/drivers/media/video/ivtv/ivtv-irq.c +++ b/drivers/media/video/ivtv/ivtv-irq.c | |||
@@ -231,14 +231,14 @@ static void dma_post(struct ivtv_stream *s) | |||
231 | struct ivtv_buffer *buf = NULL; | 231 | struct ivtv_buffer *buf = NULL; |
232 | struct list_head *p; | 232 | struct list_head *p; |
233 | u32 offset; | 233 | u32 offset; |
234 | u32 *u32buf; | 234 | __le32 *u32buf; |
235 | int x = 0; | 235 | int x = 0; |
236 | 236 | ||
237 | IVTV_DEBUG_HI_DMA("%s %s completed (%x)\n", ivtv_use_pio(s) ? "PIO" : "DMA", | 237 | IVTV_DEBUG_HI_DMA("%s %s completed (%x)\n", ivtv_use_pio(s) ? "PIO" : "DMA", |
238 | s->name, s->dma_offset); | 238 | s->name, s->dma_offset); |
239 | list_for_each(p, &s->q_dma.list) { | 239 | list_for_each(p, &s->q_dma.list) { |
240 | buf = list_entry(p, struct ivtv_buffer, list); | 240 | buf = list_entry(p, struct ivtv_buffer, list); |
241 | u32buf = (u32 *)buf->buf; | 241 | u32buf = (__le32 *)buf->buf; |
242 | 242 | ||
243 | /* Sync Buffer */ | 243 | /* Sync Buffer */ |
244 | ivtv_buf_sync_for_cpu(s, buf); | 244 | ivtv_buf_sync_for_cpu(s, buf); |
@@ -444,7 +444,7 @@ static void ivtv_dma_enc_start(struct ivtv_stream *s) | |||
444 | } | 444 | } |
445 | 445 | ||
446 | s->dma_xfer_cnt++; | 446 | s->dma_xfer_cnt++; |
447 | memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_element) * s->sg_pending_size); | 447 | memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_host_element) * s->sg_pending_size); |
448 | s->sg_processing_size = s->sg_pending_size; | 448 | s->sg_processing_size = s->sg_pending_size; |
449 | s->sg_pending_size = 0; | 449 | s->sg_pending_size = 0; |
450 | s->sg_processed = 0; | 450 | s->sg_processed = 0; |
@@ -473,7 +473,7 @@ static void ivtv_dma_dec_start(struct ivtv_stream *s) | |||
473 | if (s->q_predma.bytesused) | 473 | if (s->q_predma.bytesused) |
474 | ivtv_queue_move(s, &s->q_predma, NULL, &s->q_dma, s->q_predma.bytesused); | 474 | ivtv_queue_move(s, &s->q_predma, NULL, &s->q_dma, s->q_predma.bytesused); |
475 | s->dma_xfer_cnt++; | 475 | s->dma_xfer_cnt++; |
476 | memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_element) * s->sg_pending_size); | 476 | memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_host_element) * s->sg_pending_size); |
477 | s->sg_processing_size = s->sg_pending_size; | 477 | s->sg_processing_size = s->sg_pending_size; |
478 | s->sg_pending_size = 0; | 478 | s->sg_pending_size = 0; |
479 | s->sg_processed = 0; | 479 | s->sg_processed = 0; |
diff --git a/drivers/media/video/ivtv/ivtv-queue.c b/drivers/media/video/ivtv/ivtv-queue.c index fc8b1eaa333b..71bd13e22e2e 100644 --- a/drivers/media/video/ivtv/ivtv-queue.c +++ b/drivers/media/video/ivtv/ivtv-queue.c | |||
@@ -193,7 +193,7 @@ void ivtv_flush_queues(struct ivtv_stream *s) | |||
193 | int ivtv_stream_alloc(struct ivtv_stream *s) | 193 | int ivtv_stream_alloc(struct ivtv_stream *s) |
194 | { | 194 | { |
195 | struct ivtv *itv = s->itv; | 195 | struct ivtv *itv = s->itv; |
196 | int SGsize = sizeof(struct ivtv_sg_element) * s->buffers; | 196 | int SGsize = sizeof(struct ivtv_sg_host_element) * s->buffers; |
197 | int i; | 197 | int i; |
198 | 198 | ||
199 | if (s->buffers == 0) | 199 | if (s->buffers == 0) |
diff --git a/drivers/media/video/ivtv/ivtv-yuv.c b/drivers/media/video/ivtv/ivtv-yuv.c index a9417f6e4087..3092ff1d00a0 100644 --- a/drivers/media/video/ivtv/ivtv-yuv.c +++ b/drivers/media/video/ivtv/ivtv-yuv.c | |||
@@ -1116,7 +1116,7 @@ void ivtv_yuv_setup_stream_frame(struct ivtv *itv) | |||
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | /* Attempt to dma a frame from a user buffer */ | 1118 | /* Attempt to dma a frame from a user buffer */ |
1119 | int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void *src) | 1119 | int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void __user *src) |
1120 | { | 1120 | { |
1121 | struct yuv_playback_info *yi = &itv->yuv_info; | 1121 | struct yuv_playback_info *yi = &itv->yuv_info; |
1122 | struct ivtv_dma_frame dma_args; | 1122 | struct ivtv_dma_frame dma_args; |
diff --git a/drivers/media/video/ivtv/ivtv-yuv.h b/drivers/media/video/ivtv/ivtv-yuv.h index 2fe5f1250762..ca5173fbf006 100644 --- a/drivers/media/video/ivtv/ivtv-yuv.h +++ b/drivers/media/video/ivtv/ivtv-yuv.h | |||
@@ -35,7 +35,7 @@ extern const u32 yuv_offset[IVTV_YUV_BUFFERS]; | |||
35 | 35 | ||
36 | int ivtv_yuv_filter_check(struct ivtv *itv); | 36 | int ivtv_yuv_filter_check(struct ivtv *itv); |
37 | void ivtv_yuv_setup_stream_frame(struct ivtv *itv); | 37 | void ivtv_yuv_setup_stream_frame(struct ivtv *itv); |
38 | int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void *src); | 38 | int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void __user *src); |
39 | void ivtv_yuv_frame_complete(struct ivtv *itv); | 39 | void ivtv_yuv_frame_complete(struct ivtv *itv); |
40 | int ivtv_yuv_prep_frame(struct ivtv *itv, struct ivtv_dma_frame *args); | 40 | int ivtv_yuv_prep_frame(struct ivtv *itv, struct ivtv_dma_frame *args); |
41 | void ivtv_yuv_close(struct ivtv *itv); | 41 | void ivtv_yuv_close(struct ivtv *itv); |