media: i2c: ov7251: Switch from V4L2_CID_GAIN to V4L2_CID_ANALOGUE_GAIN
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Thu, 17 Feb 2022 18:31:56 +0000 (18:31 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 21 Mar 2022 16:04:45 +0000 (16:04 +0000)
The control is specifically for analogue gain, therefore switch
to using the control for that.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/media/i2c/ov7251.c

index 65bb3e0..adc8e19 100644 (file)
@@ -752,7 +752,7 @@ static int ov7251_s_ctrl(struct v4l2_ctrl *ctrl)
        case V4L2_CID_EXPOSURE:
                ret = ov7251_set_exposure(ov7251, ctrl->val);
                break;
-       case V4L2_CID_GAIN:
+       case V4L2_CID_ANALOGUE_GAIN:
                ret = ov7251_set_gain(ov7251, ctrl->val);
                break;
        case V4L2_CID_TEST_PATTERN:
@@ -1346,8 +1346,8 @@ static int ov7251_probe(struct i2c_client *client)
                          V4L2_CID_VFLIP, 0, 1, 1, 0);
        ov7251->exposure = v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops,
                                             V4L2_CID_EXPOSURE, 1, 32, 1, 32);
-       v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops, V4L2_CID_GAIN,
-                         16, 1023, 1, 16);
+       v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops,
+                         V4L2_CID_ANALOGUE_GAIN, 16, 1023, 1, 16);
        v4l2_ctrl_new_std_menu_items(&ov7251->ctrls, &ov7251_ctrl_ops,
                                     V4L2_CID_TEST_PATTERN,
                                     ARRAY_SIZE(ov7251_test_pattern_menu) - 1,