]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/saa7134/saa7134-vbi.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild
[linux-2.6-omap-h63xx.git] / drivers / media / video / saa7134 / saa7134-vbi.c
index 3c33c591cc8554c9f555c02927ae3389cc203027..f38366a470fa58c4cb677f3af1074054418710c8 100644 (file)
@@ -1,5 +1,4 @@
 /*
- * $Id: saa7134-vbi.c,v 1.7 2005/05/24 23:13:06 nsh Exp $
  *
  * device driver for philips saa7134 based TV cards
  * video4linux video interface
@@ -130,19 +129,13 @@ static int buffer_prepare(struct videobuf_queue *q,
        lines   = norm->vbi_v_stop_0 - norm->vbi_v_start_0 +1;
        if (lines > VBI_LINE_COUNT)
                lines = VBI_LINE_COUNT;
-#if 1
        llength = VBI_LINE_LENGTH;
-#else
-       llength = (norm->h_stop - norm->h_start +1) * 2;
-       if (llength > VBI_LINE_LENGTH)
-               llength = VBI_LINE_LENGTH;
-#endif
        size = lines * llength * 2;
        if (0 != buf->vb.baddr  &&  buf->vb.bsize < size)
                return -EINVAL;
 
        if (buf->vb.size != size)
-               saa7134_dma_free(dev,buf);
+               saa7134_dma_free(q,buf);
 
        if (STATE_NEEDS_INIT == buf->vb.state) {
                buf->vb.width  = llength;
@@ -150,7 +143,7 @@ static int buffer_prepare(struct videobuf_queue *q,
                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,
@@ -166,7 +159,7 @@ static int buffer_prepare(struct videobuf_queue *q,
        return 0;
 
  oops:
-       saa7134_dma_free(dev,buf);
+       saa7134_dma_free(q,buf);
        return err;
 }
 
@@ -178,13 +171,7 @@ buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned int *size)
        int llength,lines;
 
        lines   = dev->tvnorm->vbi_v_stop_0 - dev->tvnorm->vbi_v_start_0 +1;
-#if 1
        llength = VBI_LINE_LENGTH;
-#else
-       llength = (norm->h_stop - norm->h_start +1) * 2;
-       if (llength > VBI_LINE_LENGTH)
-               llength = VBI_LINE_LENGTH;
-#endif
        *size = lines * llength * 2;
        if (0 == *count)
                *count = vbibufs;
@@ -203,11 +190,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 = {