diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-05-11 09:36:30 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-02 14:21:45 -0400 |
commit | 952684035a91334dbe33b15063514cab5e7c6907 (patch) | |
tree | fbd82c8a9af67ab15369a1f120feafaa8836aa14 /include/media | |
parent | a438d6da52b991b6896742a0f9aed80c2f82da87 (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.h | 20 |
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 | */ | ||
90 | void videobuf_dma_init(struct videobuf_dmabuf *dma); | 100 | void videobuf_dma_init(struct videobuf_dmabuf *dma); |
91 | int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction, | 101 | int 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); |
97 | int videobuf_dma_free(struct videobuf_dmabuf *dma); | 107 | int videobuf_dma_free(struct videobuf_dmabuf *dma); |
98 | 108 | ||
99 | int videobuf_dma_map(struct videobuf_queue *q, struct videobuf_dmabuf *dma); | 109 | int videobuf_dma_map(struct device *dev, struct videobuf_dmabuf *dma); |
100 | int videobuf_dma_unmap(struct videobuf_queue *q, struct videobuf_dmabuf *dma); | 110 | int videobuf_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma); |
101 | struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf); | 111 | struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf); |
102 | 112 | ||
103 | void *videobuf_sg_alloc(size_t size); | 113 | void *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 | */ | ||
117 | int videobuf_sg_dma_map(struct device *dev, struct videobuf_dmabuf *dma); | ||
118 | int 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 | ||