aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mx1_camera.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2010-08-17 13:29:51 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:06:18 -0400
commit57bee29d6e8cf721864fa47a18366bee5ff24f21 (patch)
treeeec0e9a15386db2bbe041f9e39d60075614c5adc /drivers/media/video/mx1_camera.c
parent79c6ff93c74e793ccceb464ee3698478c812ce79 (diff)
V4L/DVB: soc-camera: allow only one video queue per device
Multiple user-space application instances can open the same video device, but it only makes sense for one of them to manage the videobuffer queue and set video format of the device. Restrict soc-camera respectively. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/mx1_camera.c')
-rw-r--r--drivers/media/video/mx1_camera.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c
index e8a5ffcb6f06..adc72c4a9f08 100644
--- a/drivers/media/video/mx1_camera.c
+++ b/drivers/media/video/mx1_camera.c
@@ -638,7 +638,7 @@ static int mx1_camera_try_fmt(struct soc_camera_device *icd,
638 return 0; 638 return 0;
639} 639}
640 640
641static int mx1_camera_reqbufs(struct soc_camera_file *icf, 641static int mx1_camera_reqbufs(struct soc_camera_device *icd,
642 struct v4l2_requestbuffers *p) 642 struct v4l2_requestbuffers *p)
643{ 643{
644 int i; 644 int i;
@@ -650,7 +650,7 @@ static int mx1_camera_reqbufs(struct soc_camera_file *icf,
650 * it hadn't triggered 650 * it hadn't triggered
651 */ 651 */
652 for (i = 0; i < p->count; i++) { 652 for (i = 0; i < p->count; i++) {
653 struct mx1_buffer *buf = container_of(icf->vb_vidq.bufs[i], 653 struct mx1_buffer *buf = container_of(icd->vb_vidq.bufs[i],
654 struct mx1_buffer, vb); 654 struct mx1_buffer, vb);
655 buf->inwork = 0; 655 buf->inwork = 0;
656 INIT_LIST_HEAD(&buf->vb.queue); 656 INIT_LIST_HEAD(&buf->vb.queue);
@@ -661,10 +661,10 @@ static int mx1_camera_reqbufs(struct soc_camera_file *icf,
661 661
662static unsigned int mx1_camera_poll(struct file *file, poll_table *pt) 662static unsigned int mx1_camera_poll(struct file *file, poll_table *pt)
663{ 663{
664 struct soc_camera_file *icf = file->private_data; 664 struct soc_camera_device *icd = file->private_data;
665 struct mx1_buffer *buf; 665 struct mx1_buffer *buf;
666 666
667 buf = list_entry(icf->vb_vidq.stream.next, struct mx1_buffer, 667 buf = list_entry(icd->vb_vidq.stream.next, struct mx1_buffer,
668 vb.stream); 668 vb.stream);
669 669
670 poll_wait(file, &buf->vb.done, pt); 670 poll_wait(file, &buf->vb.done, pt);