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

media: i2c: mt9m001: 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
8beaae2c bf5c0046

-6
-6
drivers/media/i2c/mt9m001.c
··· 93 93 struct v4l2_ctrl *autoexposure; 94 94 struct v4l2_ctrl *exposure; 95 95 }; 96 - bool streaming; 97 96 struct mutex mutex; 98 97 struct v4l2_rect rect; /* Sensor window */ 99 98 struct clk *clk; ··· 212 213 213 214 mutex_lock(&mt9m001->mutex); 214 215 215 - if (mt9m001->streaming == enable) 216 - goto done; 217 - 218 216 if (enable) { 219 217 ret = pm_runtime_resume_and_get(&client->dev); 220 218 if (ret < 0) ··· 235 239 pm_runtime_put(&client->dev); 236 240 } 237 241 238 - mt9m001->streaming = enable; 239 - done: 240 242 mutex_unlock(&mt9m001->mutex); 241 243 242 244 return 0;