From 69b70e825ed8829c1664dacbc1beb62c84ff49dd Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 4 Jul 2022 18:12:56 +0100 Subject: [PATCH 439/726] media: i2c: ov9281: Change exposure default value with mode choice When the exposure range is updated due to changing VBLANK, adopt the mode default value, not the current default. Should the specific default value be outside of the min/max range defined, then the whole update is rejected, which can leave an invalid exposure range active. Signed-off-by: Dave Stevenson --- drivers/media/i2c/ov9281.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov9281.c b/drivers/media/i2c/ov9281.c index a15081618f80..297a5c0fd849 100644 --- a/drivers/media/i2c/ov9281.c +++ b/drivers/media/i2c/ov9281.c @@ -976,7 +976,7 @@ static int ov9281_set_ctrl(struct v4l2_ctrl *ctrl) __v4l2_ctrl_modify_range(ov9281->exposure, ov9281->exposure->minimum, max, ov9281->exposure->step, - ov9281->exposure->default_value); + ov9281->cur_mode->vts_def); break; } -- 2.33.1