diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-12-25 16:29:52 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-25 19:54:49 -0500 |
commit | 24d8c0293b04ad207648bb2a0dbfebff8b47d166 (patch) | |
tree | 5e92313697b53e3b3a9d72a950d567623285b6c3 /drivers | |
parent | 501aaa110a4269c99eff9736a81b5f93bb8b59be (diff) |
[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.c | 4 |
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) | |||
405 | ret = soc_camera_set_fmt(icd, &f); | 405 | ret = soc_camera_set_fmt(icd, &f); |
406 | if (ret < 0) | 406 | if (ret < 0) |
407 | goto esfmt; | 407 | goto esfmt; |
408 | |||
409 | ici->ops->init_videobuf(&icd->vb_vidq, icd); | ||
408 | } | 410 | } |
409 | 411 | ||
410 | file->private_data = icd; | 412 | file->private_data = icd; |
411 | dev_dbg(&icd->dev, "camera device open\n"); | 413 | dev_dbg(&icd->dev, "camera device open\n"); |
412 | 414 | ||
413 | ici->ops->init_videobuf(&icd->vb_vidq, icd); | ||
414 | |||
415 | mutex_unlock(&icd->video_lock); | 415 | mutex_unlock(&icd->video_lock); |
416 | 416 | ||
417 | return 0; | 417 | return 0; |