drivers: media: imx477: Correctly set IMX477_PIXEL_RATE as a r/o control
authorNaushir Patuck <naush@raspberrypi.com>
Mon, 6 Nov 2023 09:42:37 +0000 (09:42 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:11 +0000 (11:35 +0000)
This control is meant to be read-only, mark it as such.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
drivers/media/i2c/imx477.c

index c9700d1..cc7910d 100644 (file)
@@ -2001,6 +2001,8 @@ static int imx477_init_controls(struct imx477 *imx477)
                                               IMX477_PIXEL_RATE,
                                               IMX477_PIXEL_RATE, 1,
                                               IMX477_PIXEL_RATE);
+       if (imx477->pixel_rate)
+               imx477->pixel_rate->flags |= V4L2_CTRL_FLAG_READ_ONLY;
 
        /* LINK_FREQ is also read only */
        imx477->link_freq =