From a7f3e4a5c67b2cd8379dc707b2e3c0a2a60634f3 Mon Sep 17 00:00:00 2001
From: Naushir Patuck <naush@raspberrypi.com>
Date: Mon, 6 Nov 2023 09:42:37 +0000
Subject: [PATCH 0707/1085] drivers: media: imx477: Correctly set
 IMX477_PIXEL_RATE as a r/o control

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 | 2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/media/i2c/imx477.c
+++ b/drivers/media/i2c/imx477.c
@@ -2001,6 +2001,8 @@ static int imx477_init_controls(struct i
 					       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 =
