diff options
author | Hugues Fruchet <hugues.fruchet@st.com> | 2018-09-11 09:48:20 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-17 15:32:45 -0400 |
commit | a8f438c684eaa4cbe6c98828eb996d5ec53e24fb (patch) | |
tree | 99259f826d7ace3327a96f1665d1642e589e797b /drivers/media/i2c | |
parent | c2c3f42df4dd9bb231d756bacb0c897f662c6d3c (diff) | |
download | linux-stable-a8f438c684eaa4cbe6c98828eb996d5ec53e24fb.tar.gz linux-stable-a8f438c684eaa4cbe6c98828eb996d5ec53e24fb.tar.bz2 linux-stable-a8f438c684eaa4cbe6c98828eb996d5ec53e24fb.zip |
media: ov5640: fix auto controls values when switching to manual mode
When switching from auto to manual mode, V4L2 core is calling
g_volatile_ctrl() in manual mode in order to get the manual initial value.
Remove the manual mode check/return to not break this behaviour.
Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
Tested-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/ov5640.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index 41182564ad55..61ae9a8ca3be 100644 --- a/drivers/media/i2c/ov5640.c +++ b/drivers/media/i2c/ov5640.c @@ -2334,16 +2334,12 @@ static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl) switch (ctrl->id) { case V4L2_CID_AUTOGAIN: - if (!ctrl->val) - return 0; val = ov5640_get_gain(sensor); if (val < 0) return val; sensor->ctrls.gain->val = val; break; case V4L2_CID_EXPOSURE_AUTO: - if (ctrl->val == V4L2_EXPOSURE_MANUAL) - return 0; val = ov5640_get_exposure(sensor); if (val < 0) return val; |