Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[pandora-kernel.git] / drivers / media / common / saa7146_video.c
index ae36d10..3cbc6eb 100644 (file)
@@ -1235,7 +1235,7 @@ static int buffer_activate (struct saa7146_dev *dev,
 {
        struct saa7146_vv *vv = dev->vv_data;
 
-       buf->vb.state = STATE_ACTIVE;
+       buf->vb.state = VIDEOBUF_ACTIVE;
        saa7146_set_capture(dev,buf,next);
 
        mod_timer(&vv->video_q.timeout, jiffies+BUFFER_TIMEOUT);
@@ -1281,7 +1281,7 @@ static int buffer_prepare(struct videobuf_queue *q,
                saa7146_dma_free(dev,q,buf);
        }
 
-       if (STATE_NEEDS_INIT == buf->vb.state) {
+       if (VIDEOBUF_NEEDS_INIT == buf->vb.state) {
                struct saa7146_format *sfmt;
 
                buf->vb.bytesperline  = fh->video_fmt.bytesperline;
@@ -1314,7 +1314,7 @@ static int buffer_prepare(struct videobuf_queue *q,
                if (err)
                        goto oops;
        }
-       buf->vb.state = STATE_PREPARED;
+       buf->vb.state = VIDEOBUF_PREPARED;
        buf->activate = buffer_activate;
 
        return 0;
@@ -1410,15 +1410,13 @@ static int video_open(struct saa7146_dev *dev, struct file *file)
        sfmt = format_by_fourcc(dev,fh->video_fmt.pixelformat);
        fh->video_fmt.sizeimage = (fh->video_fmt.width * fh->video_fmt.height * sfmt->depth)/8;
 
-       videobuf_queue_pci_init(&fh->video_q, &video_qops,
-                           dev->pci, &dev->slock,
+       videobuf_queue_sg_init(&fh->video_q, &video_qops,
+                           &dev->pci->dev, &dev->slock,
                            V4L2_BUF_TYPE_VIDEO_CAPTURE,
                            V4L2_FIELD_INTERLACED,
                            sizeof(struct saa7146_buf),
                            file);
 
-       mutex_init(&fh->video_q.lock);
-
        return 0;
 }
 
@@ -1453,7 +1451,7 @@ static void video_irq_done(struct saa7146_dev *dev, unsigned long st)
 
        /* only finish the buffer if we have one... */
        if( NULL != q->curr ) {
-               saa7146_buffer_finish(dev,q,STATE_DONE);
+               saa7146_buffer_finish(dev,q,VIDEOBUF_DONE);
        }
        saa7146_buffer_next(dev,q,0);