From: Kartik Mohta Date: Wed, 2 May 2012 22:19:08 +0000 (-0300) Subject: [media] mt9v032: Correct the logic for the auto-exposure setting X-Git-Tag: firefly_0821_release~3680^2~275^2~2276 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5c37598142621ca8aadfd115d8e5f51c5337f8d5;p=firefly-linux-kernel-4.4.55.git [media] mt9v032: Correct the logic for the auto-exposure setting The driver uses the ctrl value passed in as a bool to determine whether to enable auto-exposure, but the auto-exposure setting is defined as an enum where AUTO has a value of 0 and MANUAL has a value of 1. This leads to a reversed logic where if you send in AUTO, it actually sets manual exposure and vice-versa. Signed-off-by: Kartik Mohta Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/mt9v032.c b/drivers/media/video/mt9v032.c index 75e253a343c5..4ba4884c016e 100644 --- a/drivers/media/video/mt9v032.c +++ b/drivers/media/video/mt9v032.c @@ -481,7 +481,7 @@ static int mt9v032_s_ctrl(struct v4l2_ctrl *ctrl) case V4L2_CID_EXPOSURE_AUTO: return mt9v032_update_aec_agc(mt9v032, MT9V032_AEC_ENABLE, - ctrl->val); + !ctrl->val); case V4L2_CID_EXPOSURE: return mt9v032_write(client, MT9V032_TOTAL_SHUTTER_WIDTH,