Commit 24c716a9 authored by Martin Kepplinger's avatar Martin Kepplinger
Browse files

mxc-mipi-csi2_yav: s_stream: disable only when enabled

Otherwise "v4l2-ctl -d 0 --stream-mmap --stream-to=test.raw --stream-count=1"
would result in s_stream disable called twice, which makes running wrap
around to 255 and confuses the logic.
parent 92910aa3
......@@ -371,10 +371,17 @@ static int mipi_csi2_s_stream(struct v4l2_subdev *sd, int enable)
}
v4l2_subdev_call(sensor_sd, video, s_stream, true);
csi2dev->running++;
dev_dbg(&csi2dev->pdev->dev, "%s: running set to %d\n", __func__,
csi2dev->running);
} else {
if (!csi2dev->running)
return ret;
v4l2_subdev_call(sensor_sd, video, s_stream, false);
csi2dev->running--;
dev_dbg(&csi2dev->pdev->dev, "%s: running set to %d\n", __func__,
csi2dev->running);
if (!csi2dev->running) {
pm_runtime_put(dev);
mxc_mipi_csi2_disable(csi2dev);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment