V4L/DVB (6252): Adapt drivers to use the newer videobuf modules
[powerpc.git] / drivers / media / video / saa7134 / saa7134-core.c
index e62f6e8..a1d986e 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>
 #include <linux/kmod.h>
@@ -237,9 +236,10 @@ int saa7134_buffer_startpage(struct saa7134_buf *buf)
 unsigned long saa7134_buffer_base(struct saa7134_buf *buf)
 {
        unsigned long base;
+       struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
 
        base  = saa7134_buffer_startpage(buf) * 4096;
-       base += buf->vb.dma.sglist[0].offset;
+       base += dma->sglist[0].offset;
        return base;
 }
 
@@ -287,11 +287,12 @@ void saa7134_pgtable_free(struct pci_dev *pci, struct saa7134_pgtable *pt)
 
 void saa7134_dma_free(struct videobuf_queue *q,struct saa7134_buf *buf)
 {
+       struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
        BUG_ON(in_interrupt());
 
        videobuf_waiton(&buf->vb,0,0);
-       videobuf_dma_unmap(q, &buf->vb.dma);
-       videobuf_dma_free(&buf->vb.dma);
+       videobuf_dma_unmap(q, dma);
+       videobuf_dma_free(dma);
        buf->vb.state = STATE_NEEDS_INIT;
 }
 
@@ -1034,6 +1035,9 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
                saa7134_dmasound_init(dev);
        }
 
+       if (TUNER_ABSENT != dev->tuner_type)
+               saa7134_i2c_call_clients(dev, TUNER_SET_STANDBY, NULL);
+
        return 0;
 
  fail4: