current ov5675 driver did a wrong calculation for the maximum exposure value, it will cause the auto-exposure can not work as expected, this patch correct it. Signed-off-by: Bingbu Cao <bingbu.cao@xxxxxxxxx> --- drivers/media/i2c/ov5675.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov5675.c b/drivers/media/i2c/ov5675.c index 8537cc4ca108..7592cd50807a 100644 --- a/drivers/media/i2c/ov5675.c +++ b/drivers/media/i2c/ov5675.c @@ -666,8 +666,8 @@ static int ov5675_set_ctrl(struct v4l2_ctrl *ctrl) /* Propagate change of current control to all related controls */ if (ctrl->id == V4L2_CID_VBLANK) { /* Update max exposure while meeting expected vblanking */ - exposure_max = (ov5675->cur_mode->height + ctrl->val - - OV5675_EXPOSURE_MAX_MARGIN) / 2; + exposure_max = ov5675->cur_mode->height + ctrl->val - + OV5675_EXPOSURE_MAX_MARGIN; __v4l2_ctrl_modify_range(ov5675->exposure, ov5675->exposure->minimum, exposure_max, ov5675->exposure->step, -- 2.7.4