aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common/saa7146_fops.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-03-10 10:29:15 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-03-24 14:26:49 -0500
commitc7b0ac0546985fc6361a8d92cf808d46da797677 (patch)
tree2147eb2f6dd7b2b82e0d7b4b9a26e12ef5193252 /drivers/media/common/saa7146_fops.c
parentb2fd16b4ff2508ac16ae994f4bcd941f97754c00 (diff)
V4L/DVB (3516): Make video_buf more generic
Video_buf were concerned to allow PCI devices to be used as video capture devices. This patch extends video_buf features by virtualizing pci-dependent functions and allowing other type of devices to use it. It is still DMA centric, although it may be used also by devices that emulates scatter/gather behavior or a DMA device Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/common/saa7146_fops.c')
-rw-r--r--drivers/media/common/saa7146_fops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c
index 3870fa948cc0..523ab3851c7b 100644
--- a/drivers/media/common/saa7146_fops.c
+++ b/drivers/media/common/saa7146_fops.c
@@ -50,14 +50,15 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits)
50/********************************************************************************/ 50/********************************************************************************/
51/* common dma functions */ 51/* common dma functions */
52 52
53void saa7146_dma_free(struct saa7146_dev *dev,struct saa7146_buf *buf) 53void saa7146_dma_free(struct saa7146_dev *dev,struct videobuf_queue *q,
54 struct saa7146_buf *buf)
54{ 55{
55 DEB_EE(("dev:%p, buf:%p\n",dev,buf)); 56 DEB_EE(("dev:%p, buf:%p\n",dev,buf));
56 57
57 BUG_ON(in_interrupt()); 58 BUG_ON(in_interrupt());
58 59
59 videobuf_waiton(&buf->vb,0,0); 60 videobuf_waiton(&buf->vb,0,0);
60 videobuf_dma_pci_unmap(dev->pci, &buf->vb.dma); 61 videobuf_dma_unmap(q, &buf->vb.dma);
61 videobuf_dma_free(&buf->vb.dma); 62 videobuf_dma_free(&buf->vb.dma);
62 buf->vb.state = STATE_NEEDS_INIT; 63 buf->vb.state = STATE_NEEDS_INIT;
63} 64}