mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
media: mt9m111: add streaming check to set_fmt
Currently set_fmt don't care about the streaming status, so the format can be changed during streaming. This can lead into wrong behaviours. Check if the device is already streaming and return -EBUSY to avoid wrong behaviours. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
7784b1d278
commit
3c437901bd
1 changed files with 3 additions and 0 deletions
|
|
@ -563,6 +563,9 @@ static int mt9m111_set_fmt(struct v4l2_subdev *sd,
|
|||
bool bayer;
|
||||
int ret;
|
||||
|
||||
if (mt9m111->is_streaming)
|
||||
return -EBUSY;
|
||||
|
||||
if (format->pad)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue