]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/saa7134/saa7134-vbi.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
[linux-2.6-omap-h63xx.git] / drivers / media / video / saa7134 / saa7134-vbi.c
index f4aee0af80e19a942e7d10e28b7321cae709c34c..81a2aedeff5c4d6218fdb94baece6850edac2ddb 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/init.h>
 #include <linux/list.h>
 #include <linux/module.h>
-#include <linux/moduleparam.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 
@@ -135,20 +134,22 @@ static int buffer_prepare(struct videobuf_queue *q,
                return -EINVAL;
 
        if (buf->vb.size != size)
-               saa7134_dma_free(dev,buf);
+               saa7134_dma_free(q,buf);
 
        if (STATE_NEEDS_INIT == buf->vb.state) {
+               struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
+
                buf->vb.width  = llength;
                buf->vb.height = lines;
                buf->vb.size   = size;
                buf->pt        = &fh->pt_vbi;
 
-               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,
-                                           buf->vb.dma.sglist,
-                                           buf->vb.dma.sglen,
+                                           dma->sglist,
+                                           dma->sglen,
                                            saa7134_buffer_startpage(buf));
                if (err)
                        goto oops;
@@ -159,7 +160,7 @@ static int buffer_prepare(struct videobuf_queue *q,
        return 0;
 
  oops:
-       saa7134_dma_free(dev,buf);
+       saa7134_dma_free(q,buf);
        return err;
 }
 
@@ -190,11 +191,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_dev *dev = fh->dev;
        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_vbi_qops = {