aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-vbi.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/video/cx88/cx88-vbi.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/cx88/cx88-vbi.c')
-rw-r--r--drivers/media/video/cx88/cx88-vbi.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/video/cx88/cx88-vbi.c b/drivers/media/video/cx88/cx88-vbi.c
index 9bc6c8995581..846faadc9f1c 100644
--- a/drivers/media/video/cx88/cx88-vbi.c
+++ b/drivers/media/video/cx88/cx88-vbi.c
@@ -175,7 +175,7 @@ vbi_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,
175 buf->vb.size = size; 175 buf->vb.size = size;
176 buf->vb.field = V4L2_FIELD_SEQ_TB; 176 buf->vb.field = V4L2_FIELD_SEQ_TB;
177 177
178 if (0 != (rc = videobuf_iolock(dev->pci,&buf->vb,NULL))) 178 if (0 != (rc = videobuf_iolock(q,&buf->vb,NULL)))
179 goto fail; 179 goto fail;
180 cx88_risc_buffer(dev->pci, &buf->risc, 180 cx88_risc_buffer(dev->pci, &buf->risc,
181 buf->vb.dma.sglist, 181 buf->vb.dma.sglist,
@@ -187,7 +187,7 @@ vbi_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,
187 return 0; 187 return 0;
188 188
189 fail: 189 fail:
190 cx88_free_buffer(dev->pci,buf); 190 cx88_free_buffer(q,buf);
191 return rc; 191 return rc;
192} 192}
193 193
@@ -227,9 +227,8 @@ vbi_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb)
227static void vbi_release(struct videobuf_queue *q, struct videobuf_buffer *vb) 227static void vbi_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
228{ 228{
229 struct cx88_buffer *buf = container_of(vb,struct cx88_buffer,vb); 229 struct cx88_buffer *buf = container_of(vb,struct cx88_buffer,vb);
230 struct cx8800_fh *fh = q->priv_data;
231 230
232 cx88_free_buffer(fh->dev->pci,buf); 231 cx88_free_buffer(q,buf);
233} 232}
234 233
235struct videobuf_queue_ops cx8800_vbi_qops = { 234struct videobuf_queue_ops cx8800_vbi_qops = {