Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Laurent Pinchart and committed by
Hans Verkuil
36cb37a6 741358bb

-9
-9
drivers/media/i2c/ov9282.c
··· 165 165 * @cur_mode: Pointer to current selected sensor mode 166 166 * @code: Mbus code currently selected 167 167 * @mutex: Mutex for serializing sensor controls 168 - * @streaming: Flag indicating streaming state 169 168 */ 170 169 struct ov9282 { 171 170 struct device *dev; ··· 187 188 const struct ov9282_mode *cur_mode; 188 189 u32 code; 189 190 struct mutex mutex; 190 - bool streaming; 191 191 }; 192 192 193 193 static const s64 link_freq[] = { ··· 1035 1037 1036 1038 mutex_lock(&ov9282->mutex); 1037 1039 1038 - if (ov9282->streaming == enable) { 1039 - mutex_unlock(&ov9282->mutex); 1040 - return 0; 1041 - } 1042 - 1043 1040 if (enable) { 1044 1041 ret = pm_runtime_resume_and_get(ov9282->dev); 1045 1042 if (ret) ··· 1047 1054 ov9282_stop_streaming(ov9282); 1048 1055 pm_runtime_put(ov9282->dev); 1049 1056 } 1050 - 1051 - ov9282->streaming = enable; 1052 1057 1053 1058 mutex_unlock(&ov9282->mutex); 1054 1059