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

media: i2c: ov5695: 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
3ca1480a 1b59508e

-6
-6
drivers/media/i2c/ov5695.c
··· 108 108 struct v4l2_ctrl *vblank; 109 109 struct v4l2_ctrl *test_pattern; 110 110 struct mutex mutex; 111 - bool streaming; 112 111 const struct ov5695_mode *cur_mode; 113 112 }; 114 113 ··· 934 935 int ret = 0; 935 936 936 937 mutex_lock(&ov5695->mutex); 937 - on = !!on; 938 - if (on == ov5695->streaming) 939 - goto unlock_and_return; 940 938 941 939 if (on) { 942 940 ret = pm_runtime_resume_and_get(&client->dev); ··· 950 954 __ov5695_stop_stream(ov5695); 951 955 pm_runtime_put(&client->dev); 952 956 } 953 - 954 - ov5695->streaming = on; 955 957 956 958 unlock_and_return: 957 959 mutex_unlock(&ov5695->mutex);