aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/saa7134/saa7134-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-03-10 12:29:15 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-03-24 16:26:49 -0300
commitc7b0ac0546985fc6361a8d92cf808d46da797677 (patch)
tree2147eb2f6dd7b2b82e0d7b4b9a26e12ef5193252 /drivers/media/video/saa7134/saa7134-video.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/video/saa7134/saa7134-video.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-video.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
index 57a11e71d99..aeef80f88a6 100644
--- a/drivers/media/video/saa7134/saa7134-video.c
+++ b/drivers/media/video/saa7134/saa7134-video.c
@@ -993,7 +993,7 @@ static int buffer_prepare(struct videobuf_queue *q,
buf->vb.size != size ||
buf->vb.field != field ||
buf->fmt != fh->fmt) {
- saa7134_dma_free(dev,buf);
+ saa7134_dma_free(q,buf);
}
if (STATE_NEEDS_INIT == buf->vb.state) {
@@ -1004,7 +1004,7 @@ static int buffer_prepare(struct videobuf_queue *q,
buf->fmt = fh->fmt;
buf->pt = &fh->pt_cap;
- err = videobuf_iolock(dev->pci,&buf->vb,&dev->ovbuf);
+ err = videobuf_iolock(q,&buf->vb,&dev->ovbuf);
if (err)
goto oops;
err = saa7134_pgtable_build(dev->pci,buf->pt,
@@ -1019,7 +1019,7 @@ static int buffer_prepare(struct videobuf_queue *q,
return 0;
oops:
- saa7134_dma_free(dev,buf);
+ saa7134_dma_free(q,buf);
return err;
}
@@ -1045,10 +1045,9 @@ static void buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb)
static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
{
- struct saa7134_fh *fh = q->priv_data;
struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb);
- saa7134_dma_free(fh->dev,buf);
+ saa7134_dma_free(q,buf);
}
static struct videobuf_queue_ops video_qops = {