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

Commit 3eefbc69 authored by Chiranjeevi Rapolu's avatar Chiranjeevi Rapolu Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarChiranjeevi Rapolu <chiranjeevi.rapolu@intel.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 1a58fbf5
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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: