diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-05 15:23:09 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 11:58:38 -0400 |
commit | 97f8105dcd62a5c122f31ca5ae53c924c3e7d42b (patch) | |
tree | 098647cc1add583eaeeac9629e1f07ff233555be /drivers | |
parent | 21636363be97725432591071d26dc0dca088ecbb (diff) |
V4L/DVB: videobuf-dma-sg: remove external function videobuf_dma_sync()
While analyzing one of the videobuf patches, I noticed that
videobuf_dma_sync is only used internally inside videobuf-dma-sg.
So, let's remove this function, merging the code at __videobuf_dma_sync()
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/videobuf-dma-sg.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c index f733833a021e..b49f1e23298a 100644 --- a/drivers/media/video/videobuf-dma-sg.c +++ b/drivers/media/video/videobuf-dma-sg.c | |||
@@ -279,17 +279,6 @@ int videobuf_dma_map(struct videobuf_queue *q, struct videobuf_dmabuf *dma) | |||
279 | } | 279 | } |
280 | EXPORT_SYMBOL_GPL(videobuf_dma_map); | 280 | EXPORT_SYMBOL_GPL(videobuf_dma_map); |
281 | 281 | ||
282 | int videobuf_dma_sync(struct videobuf_queue *q, struct videobuf_dmabuf *dma) | ||
283 | { | ||
284 | MAGIC_CHECK(dma->magic, MAGIC_DMABUF); | ||
285 | BUG_ON(!dma->sglen); | ||
286 | |||
287 | dma_sync_sg_for_cpu(q->dev, dma->sglist, dma->nr_pages, dma->direction); | ||
288 | |||
289 | return 0; | ||
290 | } | ||
291 | EXPORT_SYMBOL_GPL(videobuf_dma_sync); | ||
292 | |||
293 | int videobuf_dma_unmap(struct videobuf_queue *q, struct videobuf_dmabuf *dma) | 282 | int videobuf_dma_unmap(struct videobuf_queue *q, struct videobuf_dmabuf *dma) |
294 | { | 283 | { |
295 | MAGIC_CHECK(dma->magic, MAGIC_DMABUF); | 284 | MAGIC_CHECK(dma->magic, MAGIC_DMABUF); |
@@ -542,10 +531,15 @@ static int __videobuf_sync(struct videobuf_queue *q, | |||
542 | struct videobuf_buffer *buf) | 531 | struct videobuf_buffer *buf) |
543 | { | 532 | { |
544 | struct videobuf_dma_sg_memory *mem = buf->priv; | 533 | struct videobuf_dma_sg_memory *mem = buf->priv; |
545 | BUG_ON(!mem); | 534 | BUG_ON(!mem || !mem->dma.sglen); |
535 | |||
546 | MAGIC_CHECK(mem->magic, MAGIC_SG_MEM); | 536 | MAGIC_CHECK(mem->magic, MAGIC_SG_MEM); |
537 | MAGIC_CHECK(mem->dma.magic, MAGIC_DMABUF); | ||
547 | 538 | ||
548 | return videobuf_dma_sync(q, &mem->dma); | 539 | dma_sync_sg_for_cpu(q->dev, mem->dma.sglist, |
540 | mem->dma.nr_pages, mem->dma.direction); | ||
541 | |||
542 | return 0; | ||
549 | } | 543 | } |
550 | 544 | ||
551 | static int __videobuf_mmap_mapper(struct videobuf_queue *q, | 545 | static int __videobuf_mmap_mapper(struct videobuf_queue *q, |