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

media: i2c: imx335: 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
ee44330b 5a6e2fc7

-9
-9
drivers/media/i2c/imx335.c
··· 119 119 * @vblank: Vertical blanking in lines 120 120 * @cur_mode: Pointer to current selected sensor mode 121 121 * @mutex: Mutex for serializing sensor controls 122 - * @streaming: Flag indicating streaming state 123 122 */ 124 123 struct imx335 { 125 124 struct device *dev; ··· 139 140 u32 vblank; 140 141 const struct imx335_mode *cur_mode; 141 142 struct mutex mutex; 142 - bool streaming; 143 143 }; 144 144 145 145 static const s64 link_freq[] = { ··· 703 705 704 706 mutex_lock(&imx335->mutex); 705 707 706 - if (imx335->streaming == enable) { 707 - mutex_unlock(&imx335->mutex); 708 - return 0; 709 - } 710 - 711 708 if (enable) { 712 709 ret = pm_runtime_resume_and_get(imx335->dev); 713 710 if (ret) ··· 715 722 imx335_stop_streaming(imx335); 716 723 pm_runtime_put(imx335->dev); 717 724 } 718 - 719 - imx335->streaming = enable; 720 725 721 726 mutex_unlock(&imx335->mutex); 722 727