diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-10 12:29:15 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-10 12:29:15 -0300 |
commit | fb8cfd68d99a74a10f633691a02b7fcb08ba366d (patch) | |
tree | 485f3afa2e5dd844d343dff22f14ab6f6238a8e7 /linux/drivers/media/video/saa7134/saa7134-ts.c | |
parent | 03f672ad25d1616170dba50e0c8c71425bc83482 (diff) | |
download | mediapointer-dvb-s2-fb8cfd68d99a74a10f633691a02b7fcb08ba366d.tar.gz mediapointer-dvb-s2-fb8cfd68d99a74a10f633691a02b7fcb08ba366d.tar.bz2 |
Make video_buf more generic
From: Mauro Carvalho Chehab <mchehab@infradead.org>
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 'linux/drivers/media/video/saa7134/saa7134-ts.c')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-ts.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-ts.c b/linux/drivers/media/video/saa7134/saa7134-ts.c index fdb2d9261..1f9c2fe98 100644 --- a/linux/drivers/media/video/saa7134/saa7134-ts.c +++ b/linux/drivers/media/video/saa7134/saa7134-ts.c @@ -91,7 +91,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, return -EINVAL; if (buf->vb.size != size) { - saa7134_dma_free(dev,buf); + saa7134_dma_free(q,buf); } if (STATE_NEEDS_INIT == buf->vb.state) { @@ -100,7 +100,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, buf->vb.size = size; buf->pt = &dev->ts.pt_ts; - err = videobuf_iolock(dev->pci,&buf->vb,NULL); + err = videobuf_iolock(q,&buf->vb,NULL); if (err) goto oops; err = saa7134_pgtable_build(dev->pci,buf->pt, @@ -128,7 +128,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, return 0; oops: - saa7134_dma_free(dev,buf); + saa7134_dma_free(q,buf); return err; } @@ -154,10 +154,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_dev *dev = q->priv_data; struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb); - saa7134_dma_free(dev,buf); + saa7134_dma_free(q,buf); } struct videobuf_queue_ops saa7134_ts_qops = { |