Commit 36cb37a6 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Hans Verkuil

media: i2c: ov9282: Drop check for reentrant .s_stream()

The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.

The streaming field of the driver's private structure is now unused,
drop it as well.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 741358bb
...@@ -165,7 +165,6 @@ struct ov9282_mode { ...@@ -165,7 +165,6 @@ struct ov9282_mode {
* @cur_mode: Pointer to current selected sensor mode * @cur_mode: Pointer to current selected sensor mode
* @code: Mbus code currently selected * @code: Mbus code currently selected
* @mutex: Mutex for serializing sensor controls * @mutex: Mutex for serializing sensor controls
* @streaming: Flag indicating streaming state
*/ */
struct ov9282 { struct ov9282 {
struct device *dev; struct device *dev;
...@@ -188,7 +187,6 @@ struct ov9282 { ...@@ -188,7 +187,6 @@ struct ov9282 {
const struct ov9282_mode *cur_mode; const struct ov9282_mode *cur_mode;
u32 code; u32 code;
struct mutex mutex; struct mutex mutex;
bool streaming;
}; };
static const s64 link_freq[] = { static const s64 link_freq[] = {
...@@ -1037,11 +1035,6 @@ static int ov9282_set_stream(struct v4l2_subdev *sd, int enable) ...@@ -1037,11 +1035,6 @@ static int ov9282_set_stream(struct v4l2_subdev *sd, int enable)
mutex_lock(&ov9282->mutex); mutex_lock(&ov9282->mutex);
if (ov9282->streaming == enable) {
mutex_unlock(&ov9282->mutex);
return 0;
}
if (enable) { if (enable) {
ret = pm_runtime_resume_and_get(ov9282->dev); ret = pm_runtime_resume_and_get(ov9282->dev);
if (ret) if (ret)
...@@ -1055,8 +1048,6 @@ static int ov9282_set_stream(struct v4l2_subdev *sd, int enable) ...@@ -1055,8 +1048,6 @@ static int ov9282_set_stream(struct v4l2_subdev *sd, int enable)
pm_runtime_put(ov9282->dev); pm_runtime_put(ov9282->dev);
} }
ov9282->streaming = enable;
mutex_unlock(&ov9282->mutex); mutex_unlock(&ov9282->mutex);
return 0; return 0;
......
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