Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24d8c029 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 501aaa11
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;