aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@pengutronix.de>2008-04-22 13:42:13 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:07:44 -0400
commit0705135e59f8503e4dade4b3580fed77b1743b7c (patch)
tree9ab28abeff6cb8ffa50e565204ed4394524d28d7 /include/media
parentf13613acfb1a71895ac886dc831d6ae4e20e241a (diff)
V4L/DVB (7237): Convert videobuf-dma-sg to generic DMA API
videobuf-dma-sg does not need to depend on PCI. Switch it to using generic DMA API, convert all affected drivers, relax Kconfig restriction, improve compile-time type checking, fix some Coding Style violations while at it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/videobuf-dma-sg.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/media/videobuf-dma-sg.h b/include/media/videobuf-dma-sg.h
index 38105031db23..b6ab08045de6 100644
--- a/include/media/videobuf-dma-sg.h
+++ b/include/media/videobuf-dma-sg.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * helper functions for PCI DMA video4linux capture buffers 2 * helper functions for SG DMA video4linux capture buffers
3 * 3 *
4 * The functions expect the hardware being able to scatter gatter 4 * The functions expect the hardware being able to scatter gatter
5 * (i.e. the buffers are not linear in physical memory, but fragmented 5 * (i.e. the buffers are not linear in physical memory, but fragmented
@@ -81,7 +81,7 @@ struct videobuf_dmabuf {
81 int direction; 81 int direction;
82}; 82};
83 83
84struct videbuf_pci_sg_memory 84struct videobuf_dma_sg_memory
85{ 85{
86 u32 magic; 86 u32 magic;
87 87
@@ -103,11 +103,11 @@ int videobuf_dma_sync(struct videobuf_queue* q,struct videobuf_dmabuf *dma);
103int videobuf_dma_unmap(struct videobuf_queue* q,struct videobuf_dmabuf *dma); 103int videobuf_dma_unmap(struct videobuf_queue* q,struct videobuf_dmabuf *dma);
104struct videobuf_dmabuf *videobuf_to_dma (struct videobuf_buffer *buf); 104struct videobuf_dmabuf *videobuf_to_dma (struct videobuf_buffer *buf);
105 105
106void *videobuf_pci_alloc (size_t size); 106void *videobuf_sg_alloc(size_t size);
107 107
108void videobuf_queue_pci_init(struct videobuf_queue* q, 108void videobuf_queue_sg_init(struct videobuf_queue* q,
109 struct videobuf_queue_ops *ops, 109 struct videobuf_queue_ops *ops,
110 void *dev, 110 struct device *dev,
111 spinlock_t *irqlock, 111 spinlock_t *irqlock,
112 enum v4l2_buf_type type, 112 enum v4l2_buf_type type,
113 enum v4l2_field field, 113 enum v4l2_field field,
@@ -117,6 +117,6 @@ void videobuf_queue_pci_init(struct videobuf_queue* q,
117 /*FIXME: these variants are used only on *-alsa code, where videobuf is 117 /*FIXME: these variants are used only on *-alsa code, where videobuf is
118 * used without queue 118 * used without queue
119 */ 119 */
120int videobuf_pci_dma_map(struct pci_dev *pci,struct videobuf_dmabuf *dma); 120int videobuf_sg_dma_map(struct device *dev, struct videobuf_dmabuf *dma);
121int videobuf_pci_dma_unmap(struct pci_dev *pci,struct videobuf_dmabuf *dma); 121int videobuf_sg_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma);
122 122