From: Colin Ian King Date: Tue, 29 Jul 2025 07:00:21 +0000 (+0100) Subject: media: i2c: ov5648: make read-only arrays regs and values static const X-Git-Tag: v6.18-rc1~133^2~285 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=efe0832f57bd8a7155a63f3375353c27e3967959;p=thirdparty%2Fkernel%2Fstable.git 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 Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/i2c/ov5648.c b/drivers/media/i2c/ov5648.c index 8a3190bf73daf..f0b839cd65f11 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;