aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common/saa7146_video.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/common/saa7146_video.c')
-rw-r--r--drivers/media/common/saa7146_video.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c
index 664280c78ff2..29dbc602a484 100644
--- a/drivers/media/common/saa7146_video.c
+++ b/drivers/media/common/saa7146_video.c
@@ -594,8 +594,9 @@ static int set_control(struct saa7146_fh *fh, struct v4l2_control *c)
594static int saa7146_pgtable_build(struct saa7146_dev *dev, struct saa7146_buf *buf) 594static int saa7146_pgtable_build(struct saa7146_dev *dev, struct saa7146_buf *buf)
595{ 595{
596 struct pci_dev *pci = dev->pci; 596 struct pci_dev *pci = dev->pci;
597 struct scatterlist *list = buf->vb.dma.sglist; 597 struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
598 int length = buf->vb.dma.sglen; 598 struct scatterlist *list = dma->sglist;
599 int length = dma->sglen;
599 struct saa7146_format *sfmt = format_by_fourcc(dev,buf->fmt->pixelformat); 600 struct saa7146_format *sfmt = format_by_fourcc(dev,buf->fmt->pixelformat);
600 601
601 DEB_EE(("dev:%p, buf:%p, sg_len:%d\n",dev,buf,length)); 602 DEB_EE(("dev:%p, buf:%p, sg_len:%d\n",dev,buf,length));
@@ -655,7 +656,7 @@ static int saa7146_pgtable_build(struct saa7146_dev *dev, struct saa7146_buf *bu
655 656
656 /* if we have a user buffer, the first page may not be 657 /* if we have a user buffer, the first page may not be
657 aligned to a page boundary. */ 658 aligned to a page boundary. */
658 pt1->offset = buf->vb.dma.sglist->offset; 659 pt1->offset = list->offset;
659 pt2->offset = pt1->offset+o1; 660 pt2->offset = pt1->offset+o1;
660 pt3->offset = pt1->offset+o2; 661 pt3->offset = pt1->offset+o2;
661 662
@@ -1411,7 +1412,7 @@ static int video_open(struct saa7146_dev *dev, struct file *file)
1411 sfmt = format_by_fourcc(dev,fh->video_fmt.pixelformat); 1412 sfmt = format_by_fourcc(dev,fh->video_fmt.pixelformat);
1412 fh->video_fmt.sizeimage = (fh->video_fmt.width * fh->video_fmt.height * sfmt->depth)/8; 1413 fh->video_fmt.sizeimage = (fh->video_fmt.width * fh->video_fmt.height * sfmt->depth)/8;
1413 1414
1414 videobuf_queue_init(&fh->video_q, &video_qops, 1415 videobuf_queue_pci_init(&fh->video_q, &video_qops,
1415 dev->pci, &dev->slock, 1416 dev->pci, &dev->slock,
1416 V4L2_BUF_TYPE_VIDEO_CAPTURE, 1417 V4L2_BUF_TYPE_VIDEO_CAPTURE,
1417 V4L2_FIELD_INTERLACED, 1418 V4L2_FIELD_INTERLACED,