summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2025-07-29 10:00:21 +0300
committerHans Verkuil <hverkuil+cisco@kernel.org>2025-08-25 16:40:38 +0300
commitefe0832f57bd8a7155a63f3375353c27e3967959 (patch)
tree430ed8515ff7dd8148a4798835e3bc156aef2600
parent3c5ca0a48bb02c9639de9adf3325f85b9cd11af2 (diff)
downloadlinux-efe0832f57bd8a7155a63f3375353c27e3967959.tar.xz
media: i2c: ov5648: make read-only arrays regs and values static const
Don't populate the read-only arrays regs and values on the stack at run time, instead make them static const. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
-rw-r--r--drivers/media/i2c/ov5648.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/i2c/ov5648.c b/drivers/media/i2c/ov5648.c
index 8a3190bf73da..f0b839cd65f1 100644
--- a/drivers/media/i2c/ov5648.c
+++ b/drivers/media/i2c/ov5648.c
@@ -1061,8 +1061,8 @@ static int ov5648_sw_standby(struct ov5648_sensor *sensor, int standby)
static int ov5648_chip_id_check(struct ov5648_sensor *sensor)
{
- u16 regs[] = { OV5648_CHIP_ID_H_REG, OV5648_CHIP_ID_L_REG };
- u8 values[] = { OV5648_CHIP_ID_H_VALUE, OV5648_CHIP_ID_L_VALUE };
+ static const u16 regs[] = { OV5648_CHIP_ID_H_REG, OV5648_CHIP_ID_L_REG };
+ static const u8 values[] = { OV5648_CHIP_ID_H_VALUE, OV5648_CHIP_ID_L_VALUE };
unsigned int i;
u8 value;
int ret;