[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>

authored by Guennadi Liakhovetski and committed by Mauro Carvalho Chehab 24d8c029 501aaa11

+2 -2
+2 -2
drivers/media/video/soc_camera.c
··· 405 405 ret = soc_camera_set_fmt(icd, &f); 406 406 if (ret < 0) 407 407 goto esfmt; 408 + 409 + ici->ops->init_videobuf(&icd->vb_vidq, icd); 408 410 } 409 411 410 412 file->private_data = icd; 411 413 dev_dbg(&icd->dev, "camera device open\n"); 412 - 413 - ici->ops->init_videobuf(&icd->vb_vidq, icd); 414 414 415 415 mutex_unlock(&icd->video_lock); 416 416