diff options
28 files changed, 48 insertions, 37 deletions
diff --git a/drivers/media/common/saa7146_vbi.c b/drivers/media/common/saa7146_vbi.c index 8224c301d050..2d4533ab22b7 100644 --- a/drivers/media/common/saa7146_vbi.c +++ b/drivers/media/common/saa7146_vbi.c @@ -412,7 +412,7 @@ static int vbi_open(struct saa7146_dev *dev, struct file *file) V4L2_BUF_TYPE_VBI_CAPTURE, V4L2_FIELD_SEQ_TB, // FIXME: does this really work? sizeof(struct saa7146_buf), - file); + file, NULL); init_timer(&fh->vbi_read_timeout); fh->vbi_read_timeout.function = vbi_read_timeout; diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index a212a91a30f0..741c5732b430 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c @@ -1386,7 +1386,7 @@ static int video_open(struct saa7146_dev *dev, struct file *file) V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_INTERLACED, sizeof(struct saa7146_buf), - file); + file, NULL); return 0; } diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c index 7989a7ba7c40..162fd5f9d448 100644 --- a/drivers/media/video/au0828/au0828-video.c +++ b/drivers/media/video/au0828/au0828-video.c @@ -965,7 +965,7 @@ static int au0828_v4l2_open(struct file *filp) NULL, &dev->slock, V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_INTERLACED, - sizeof(struct au0828_buffer), fh); + sizeof(struct au0828_buffer), fh, NULL); /* VBI Setup */ dev->vbi_width = 720; @@ -974,7 +974,7 @@ static int au0828_v4l2_open(struct file *filp) NULL, &dev->slock, V4L2_BUF_TYPE_VBI_CAPTURE, V4L2_FIELD_SEQ_TB, - sizeof(struct au0828_buffer), fh); + sizeof(struct au0828_buffer), fh, NULL); return ret; diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 69a8ad24c0b3..3da6e80e1041 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c @@ -3318,13 +3318,13 @@ static int bttv_open(struct file *file) V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_INTERLACED, sizeof(struct bttv_buffer), - fh); + fh, NULL); videobuf_queue_sg_init(&fh->vbi, &bttv_vbi_qops, &btv->c.pci->dev, &btv->s_lock, V4L2_BUF_TYPE_VBI_CAPTURE, V4L2_FIELD_SEQ_TB, sizeof(struct bttv_buffer), - fh); + fh, NULL); set_tvnorm(btv,btv->tvnorm); set_input(btv, btv->input, btv->tvnorm); diff --git a/drivers/media/video/cx231xx/cx231xx-video.c b/drivers/media/video/cx231xx/cx231xx-video.c index e76014561aa7..b638c4ed3f2e 100644 --- a/drivers/media/video/cx231xx/cx231xx-video.c +++ b/drivers/media/video/cx231xx/cx231xx-video.c @@ -2008,7 +2008,8 @@ static int cx231xx_v4l2_open(struct file *filp) videobuf_queue_vmalloc_init(&fh->vb_vidq, &cx231xx_video_qops, NULL, &dev->video_mode.slock, fh->type, V4L2_FIELD_INTERLACED, - sizeof(struct cx231xx_buffer), fh); + sizeof(struct cx231xx_buffer), + fh, NULL); if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) { /* Set the required alternate setting VBI interface works in Bulk mode only */ @@ -2017,7 +2018,8 @@ static int cx231xx_v4l2_open(struct file *filp) videobuf_queue_vmalloc_init(&fh->vb_vidq, &cx231xx_vbi_qops, NULL, &dev->vbi_mode.slock, fh->type, V4L2_FIELD_SEQ_TB, - sizeof(struct cx231xx_buffer), fh); + sizeof(struct cx231xx_buffer), + fh, NULL); } mutex_unlock(&dev->lock); diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c index abd64e89f60f..6628e07a8093 100644 --- a/drivers/media/video/cx23885/cx23885-417.c +++ b/drivers/media/video/cx23885/cx23885-417.c @@ -1591,7 +1591,7 @@ static int mpeg_open(struct file *file) V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_INTERLACED, sizeof(struct cx23885_buffer), - fh); + fh, NULL); unlock_kernel(); return 0; diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c index 0674ea1bf863..5958cb882e93 100644 --- a/drivers/media/video/cx23885/cx23885-dvb.c +++ b/drivers/media/video/cx23885/cx23885-dvb.c @@ -1071,7 +1071,7 @@ int cx23885_dvb_register(struct cx23885_tsport *port) videobuf_queue_sg_init(&fe0->dvb.dvbq, &dvb_qops, &dev->pci->dev, &port->slock, V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_TOP, - sizeof(struct cx23885_buffer), port); + sizeof(struct cx23885_buffer), port, NULL); } err = dvb_register(port); if (err != 0) diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c index 5aadc1d1956e..3173cc69ac61 100644 --- a/drivers/media/video/cx23885/cx23885-video.c +++ b/drivers/media/video/cx23885/cx23885-video.c @@ -758,7 +758,7 @@ static int video_open(struct file *file) V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_INTERLACED, sizeof(struct cx23885_buffer), - fh); + fh, NULL); dprintk(1, "post videobuf_queue_init()\n"); diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index ec3299585434..ac885f49313c 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c @@ -1094,7 +1094,7 @@ static int mpeg_open(struct file *file) V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_INTERLACED, sizeof(struct cx88_buffer), - fh); + fh, NULL); /* FIXME: locking against other video device */ cx88_set_scale(dev->core, dev->width, dev->height, diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index e24fd8d711d8..a037e925ceb9 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c @@ -1576,7 +1576,7 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv) V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_TOP, sizeof(struct cx88_buffer), - dev); + dev, NULL); /* init struct videobuf_dvb */ fe->dvb.name = dev->core->name; } diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 2da9117b138e..19c64a7d0985 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c @@ -793,13 +793,13 @@ static int video_open(struct file *file) V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_INTERLACED, sizeof(struct cx88_buffer), - fh); + fh, NULL); videobuf_queue_sg_init(&fh->vbiq, &cx8800_vbi_qops, &dev->pci->dev, &dev->slock, V4L2_BUF_TYPE_VBI_CAPTURE, V4L2_FIELD_SEQ_TB, sizeof(struct cx88_buffer), - fh); + fh, NULL); if (fh->radio) { dprintk(1,"video_open: setting radio device\n"); diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 95a4b60a1eda..a0627cdb706b 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c @@ -2182,13 +2182,13 @@ static int em28xx_v4l2_open(struct file *filp) videobuf_queue_vmalloc_init(&fh->vb_vidq, &em28xx_video_qops, NULL, &dev->slock, V4L2_BUF_TYPE_VIDEO_CAPTURE, field, - sizeof(struct em28xx_buffer), fh); + sizeof(struct em28xx_buffer), fh, NULL); videobuf_queue_vmalloc_init(&fh->vb_vbiq, &em28xx_vbi_qops, NULL, &dev->slock, V4L2_BUF_TYPE_VBI_CAPTURE, V4L2_FIELD_SEQ_TB, - sizeof(struct em28xx_buffer), fh); + sizeof(struct em28xx_buffer), fh, NULL); mutex_unlock(&dev->lock); diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c index 8f7434182bc3..f5a46c458717 100644 --- a/drivers/media/video/s2255drv.c +++ b/drivers/media/video/s2255drv.c @@ -1817,7 +1817,7 @@ static int s2255_open(struct file *file) NULL, &dev->slock, fh->type, V4L2_FIELD_INTERLACED, - sizeof(struct s2255_buffer), fh); + sizeof(struct s2255_buffer), fh, NULL); return 0; } diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index f26fe7661a1d..beb95e21d109 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c @@ -1111,7 +1111,7 @@ static int dvb_init(struct saa7134_dev *dev) V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_ALTERNATE, sizeof(struct saa7134_buf), - dev); + dev, NULL); switch (dev->board) { case SAA7134_BOARD_PINNACLE_300I_DVBT_PAL: diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index e763f9fd0133..1467a30a434f 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c @@ -542,7 +542,7 @@ static int empress_init(struct saa7134_dev *dev) V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_ALTERNATE, sizeof(struct saa7134_buf), - dev); + dev, NULL); empress_signal_update(&dev->empress_workqueue); return 0; diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 645224cfd887..fae5e97a3eb2 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c @@ -1366,13 +1366,13 @@ static int video_open(struct file *file) V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_INTERLACED, sizeof(struct saa7134_buf), - fh); + fh, NULL); videobuf_queue_sg_init(&fh->vbi, &saa7134_vbi_qops, &dev->pci->dev, &dev->slock, V4L2_BUF_TYPE_VBI_CAPTURE, V4L2_FIELD_SEQ_TB, sizeof(struct saa7134_buf), - fh); + fh, NULL); saa7134_pgtable_alloc(dev->pci,&fh->pt_cap); saa7134_pgtable_alloc(dev->pci,&fh->pt_vbi); diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c index 2930665910b7..a32ef8eafc01 100644 --- a/drivers/media/video/videobuf-core.c +++ b/drivers/media/video/videobuf-core.c @@ -125,11 +125,13 @@ void videobuf_queue_core_init(struct videobuf_queue *q, enum v4l2_field field, unsigned int msize, void *priv, - struct videobuf_qtype_ops *int_ops) + struct videobuf_qtype_ops *int_ops, + struct mutex *ext_lock) { BUG_ON(!q); memset(q, 0, sizeof(*q)); q->irqlock = irqlock; + q->ext_lock = ext_lock; q->dev = dev; q->type = type; q->field = field; diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c index 047054f79601..4d0a723b744b 100644 --- a/drivers/media/video/videobuf-dma-contig.c +++ b/drivers/media/video/videobuf-dma-contig.c @@ -349,10 +349,11 @@ void videobuf_queue_dma_contig_init(struct videobuf_queue *q, enum v4l2_buf_type type, enum v4l2_field field, unsigned int msize, - void *priv) + void *priv, + struct mutex *ext_lock) { videobuf_queue_core_init(q, ops, dev, irqlock, type, field, msize, - priv, &qops); + priv, &qops, ext_lock); } EXPORT_SYMBOL_GPL(videobuf_queue_dma_contig_init); diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c index 515ae887ffcf..359f2f3fdc77 100644 --- a/drivers/media/video/videobuf-dma-sg.c +++ b/drivers/media/video/videobuf-dma-sg.c @@ -654,10 +654,11 @@ void videobuf_queue_sg_init(struct videobuf_queue *q, enum v4l2_buf_type type, enum v4l2_field field, unsigned int msize, - void *priv) + void *priv, + struct mutex *ext_lock) { videobuf_queue_core_init(q, ops, dev, irqlock, type, field, msize, - priv, &sg_ops); + priv, &sg_ops, ext_lock); } EXPORT_SYMBOL_GPL(videobuf_queue_sg_init); diff --git a/drivers/media/video/videobuf-vmalloc.c b/drivers/media/video/videobuf-vmalloc.c index 91348b3170ff..df142580e44c 100644 --- a/drivers/media/video/videobuf-vmalloc.c +++ b/drivers/media/video/videobuf-vmalloc.c @@ -304,10 +304,11 @@ void videobuf_queue_vmalloc_init(struct videobuf_queue *q, enum v4l2_buf_type type, enum v4l2_field field, unsigned int msize, - void *priv) + void *priv, + struct mutex *ext_lock) { videobuf_queue_core_init(q, ops, dev, irqlock, type, field, msize, - priv, &qops); + priv, &qops, ext_lock); } EXPORT_SYMBOL_GPL(videobuf_queue_vmalloc_init); diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index e17b6fee046b..547f5e546c9c 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c @@ -1176,7 +1176,7 @@ static int __init vivi_create_instance(int inst) videobuf_queue_vmalloc_init(&dev->vb_vidq, &vivi_video_qops, NULL, &dev->slock, V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_INTERLACED, - sizeof(struct vivi_buffer), dev); + sizeof(struct vivi_buffer), dev, NULL); /* init video dma queues */ INIT_LIST_HEAD(&dev->vidq.active); diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c index 616c61fb3493..7dfb01e9930e 100644 --- a/drivers/media/video/zr364xx.c +++ b/drivers/media/video/zr364xx.c @@ -1304,7 +1304,7 @@ static int zr364xx_open(struct file *file) NULL, &cam->slock, cam->type, V4L2_FIELD_NONE, - sizeof(struct zr364xx_buffer), cam); + sizeof(struct zr364xx_buffer), cam, NULL); /* Added some delay here, since opening/closing the camera quickly, * like Ekiga does during its startup, can crash the webcam diff --git a/drivers/staging/cx25821/cx25821-video.c b/drivers/staging/cx25821/cx25821-video.c index 6fff985358a6..e7f1d5778cec 100644 --- a/drivers/staging/cx25821/cx25821-video.c +++ b/drivers/staging/cx25821/cx25821-video.c @@ -856,7 +856,7 @@ static int video_open(struct file *file) &dev->pci->dev, &dev->slock, V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_INTERLACED, - sizeof(struct cx25821_buffer), fh); + sizeof(struct cx25821_buffer), fh, NULL); dprintk(1, "post videobuf_queue_init()\n"); unlock_kernel(); diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index ce0a089a0771..4c22c6584940 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -1300,7 +1300,7 @@ static int tm6000_open(struct file *file) NULL, &dev->slock, fh->type, V4L2_FIELD_INTERLACED, - sizeof(struct tm6000_buffer),fh); + sizeof(struct tm6000_buffer), fh, NULL); return 0; } diff --git a/include/media/videobuf-core.h b/include/media/videobuf-core.h index f5eb2cbf3002..9a4194557e4a 100644 --- a/include/media/videobuf-core.h +++ b/include/media/videobuf-core.h @@ -198,7 +198,8 @@ void videobuf_queue_core_init(struct videobuf_queue *q, enum v4l2_field field, unsigned int msize, void *priv, - struct videobuf_qtype_ops *int_ops); + struct videobuf_qtype_ops *int_ops, + struct mutex *ext_lock); int videobuf_queue_is_busy(struct videobuf_queue *q); void videobuf_queue_cancel(struct videobuf_queue *q); diff --git a/include/media/videobuf-dma-contig.h b/include/media/videobuf-dma-contig.h index ebaa9bc1ee8d..f0ed82543d9f 100644 --- a/include/media/videobuf-dma-contig.h +++ b/include/media/videobuf-dma-contig.h @@ -23,7 +23,8 @@ void videobuf_queue_dma_contig_init(struct videobuf_queue *q, enum v4l2_buf_type type, enum v4l2_field field, unsigned int msize, - void *priv); + void *priv, + struct mutex *ext_lock); dma_addr_t videobuf_to_dma_contig(struct videobuf_buffer *buf); void videobuf_dma_contig_free(struct videobuf_queue *q, diff --git a/include/media/videobuf-dma-sg.h b/include/media/videobuf-dma-sg.h index aa4ebb42a565..1c647e8148c4 100644 --- a/include/media/videobuf-dma-sg.h +++ b/include/media/videobuf-dma-sg.h @@ -103,7 +103,8 @@ void videobuf_queue_sg_init(struct videobuf_queue *q, enum v4l2_buf_type type, enum v4l2_field field, unsigned int msize, - void *priv); + void *priv, + struct mutex *ext_lock); #endif /* _VIDEOBUF_DMA_SG_H */ diff --git a/include/media/videobuf-vmalloc.h b/include/media/videobuf-vmalloc.h index e19403c18dae..486a97efdb56 100644 --- a/include/media/videobuf-vmalloc.h +++ b/include/media/videobuf-vmalloc.h @@ -36,7 +36,8 @@ void videobuf_queue_vmalloc_init(struct videobuf_queue *q, enum v4l2_buf_type type, enum v4l2_field field, unsigned int msize, - void *priv); + void *priv, + struct mutex *ext_lock); void *videobuf_to_vmalloc(struct videobuf_buffer *buf); |