summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2010-12-25 22:29:52 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-26 01:54:49 +0100
commit24d8c0293b04ad207648bb2a0dbfebff8b47d166 (patch)
tree5e92313697b53e3b3a9d72a950d567623285b6c3 /drivers
parent[media] mceusb: set a default rx timeout (diff)
downloadlinux-24d8c0293b04ad207648bb2a0dbfebff8b47d166.tar.xz
linux-24d8c0293b04ad207648bb2a0dbfebff8b47d166.zip
[media] v4l: soc-camera: fix multiple simultaneous user case
A recent patch has introduced a regression, whereby a second open of an soc-camera video device breaks the running capture. This patch fixes this bug by guaranteeing, that video buffers get initialised only during the first open of the device node. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/soc_camera.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
index 335120c2021b..052bd6dfa5a7 100644
--- a/drivers/media/video/soc_camera.c
+++ b/drivers/media/video/soc_camera.c
@@ -405,13 +405,13 @@ static int soc_camera_open(struct file *file)
ret = soc_camera_set_fmt(icd, &f);
if (ret < 0)
goto esfmt;
+
+ ici->ops->init_videobuf(&icd->vb_vidq, icd);
}
file->private_data = icd;
dev_dbg(&icd->dev, "camera device open\n");
- ici->ops->init_videobuf(&icd->vb_vidq, icd);
-
mutex_unlock(&icd->video_lock);
return 0;