aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-05-11 09:36:30 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 14:21:45 -0400
commit952684035a91334dbe33b15063514cab5e7c6907 (patch)
treefbd82c8a9af67ab15369a1f120feafaa8836aa14 /include/media
parenta438d6da52b991b6896742a0f9aed80c2f82da87 (diff)
V4L/DVB: videobuf: Remove the videobuf_sg_dma_map/unmap functions
Instead of creating dirty wrappers around videobuf_dma_map/unmap that create a dummy videobuf_queue structure, modify videobuf_dma_map/unmap to take a device pointer argument and use it directly. The videobuf_sg_dma_map/unmap then become unused and can be removed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/videobuf-dma-sg.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/include/media/videobuf-dma-sg.h b/include/media/videobuf-dma-sg.h
index a195f3b9c00a..80130100e450 100644
--- a/include/media/videobuf-dma-sg.h
+++ b/include/media/videobuf-dma-sg.h
@@ -87,6 +87,16 @@ struct videobuf_dma_sg_memory {
87 struct videobuf_dmabuf dma; 87 struct videobuf_dmabuf dma;
88}; 88};
89 89
90/*
91 * Scatter-gather DMA buffer API.
92 *
93 * These functions provide a simple way to create a page list and a
94 * scatter-gather list from a kernel, userspace of physical address and map the
95 * memory for DMA operation.
96 *
97 * Despite the name, this is totally unrelated to videobuf, except that
98 * videobuf-dma-sg uses the same API internally.
99 */
90void videobuf_dma_init(struct videobuf_dmabuf *dma); 100void videobuf_dma_init(struct videobuf_dmabuf *dma);
91int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction, 101int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction,
92 unsigned long data, unsigned long size); 102 unsigned long data, unsigned long size);
@@ -96,8 +106,8 @@ int videobuf_dma_init_overlay(struct videobuf_dmabuf *dma, int direction,
96 dma_addr_t addr, int nr_pages); 106 dma_addr_t addr, int nr_pages);
97int videobuf_dma_free(struct videobuf_dmabuf *dma); 107int videobuf_dma_free(struct videobuf_dmabuf *dma);
98 108
99int videobuf_dma_map(struct videobuf_queue *q, struct videobuf_dmabuf *dma); 109int videobuf_dma_map(struct device *dev, struct videobuf_dmabuf *dma);
100int videobuf_dma_unmap(struct videobuf_queue *q, struct videobuf_dmabuf *dma); 110int videobuf_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma);
101struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf); 111struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf);
102 112
103void *videobuf_sg_alloc(size_t size); 113void *videobuf_sg_alloc(size_t size);
@@ -111,11 +121,5 @@ void videobuf_queue_sg_init(struct videobuf_queue *q,
111 unsigned int msize, 121 unsigned int msize,
112 void *priv); 122 void *priv);
113 123
114/*FIXME: these variants are used only on *-alsa code, where videobuf is
115 * used without queue
116 */
117int videobuf_sg_dma_map(struct device *dev, struct videobuf_dmabuf *dma);
118int videobuf_sg_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma);
119
120#endif /* _VIDEOBUF_DMA_SG_H */ 124#endif /* _VIDEOBUF_DMA_SG_H */
121 125