summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorChiranjeevi Rapolu2017-09-02 00:08:31 +0200
committerMauro Carvalho Chehab2017-10-04 22:09:47 +0200
commit3eefbc69bbdc7bca8c3751e525902d779ca1cdd3 (patch)
treef828ca7241f3455d9e2116816d79379cb3de79ed /drivers/media/i2c
parent[media] dw9714: Set the v4l2 focus ctrl step as 1 (diff)
downloadkernel-qcow2-linux-3eefbc69bbdc7bca8c3751e525902d779ca1cdd3.tar.gz
kernel-qcow2-linux-3eefbc69bbdc7bca8c3751e525902d779ca1cdd3.tar.xz
kernel-qcow2-linux-3eefbc69bbdc7bca8c3751e525902d779ca1cdd3.zip
[media] media: ov5670: Fix not streaming issue after resume
Previously, the sensor was not streaming after resume from suspend, i.e. on S0->S3->S0 transition. Due to this, camera app preview appeared as stuck. Now, handle streaming state correctly in case of suspend-resume. Signed-off-by: Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/ov5670.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c
index 759ca6229db9..a65469f88e36 100644
--- a/drivers/media/i2c/ov5670.c
+++ b/drivers/media/i2c/ov5670.c
@@ -2341,8 +2341,6 @@ static int ov5670_start_streaming(struct ov5670 *ov5670)
return ret;
}
- ov5670->streaming = true;
-
return 0;
}
@@ -2356,8 +2354,6 @@ static int ov5670_stop_streaming(struct ov5670 *ov5670)
if (ret)
dev_err(&client->dev, "%s failed to set stream\n", __func__);
- ov5670->streaming = false;
-
/* Return success even if it was an error, as there is nothing the
* caller can do about it.
*/
@@ -2388,6 +2384,7 @@ static int ov5670_set_stream(struct v4l2_subdev *sd, int enable)
ret = ov5670_stop_streaming(ov5670);
pm_runtime_put(&client->dev);
}
+ ov5670->streaming = enable;
goto unlock_and_return;
error: