Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Colin Ian King and committed by
Hans Verkuil
efe0832f 3c5ca0a4

+2 -2
+2 -2
drivers/media/i2c/ov5648.c
··· 1061 1061 1062 1062 static int ov5648_chip_id_check(struct ov5648_sensor *sensor) 1063 1063 { 1064 - u16 regs[] = { OV5648_CHIP_ID_H_REG, OV5648_CHIP_ID_L_REG }; 1065 - u8 values[] = { OV5648_CHIP_ID_H_VALUE, OV5648_CHIP_ID_L_VALUE }; 1064 + static const u16 regs[] = { OV5648_CHIP_ID_H_REG, OV5648_CHIP_ID_L_REG }; 1065 + static const u8 values[] = { OV5648_CHIP_ID_H_VALUE, OV5648_CHIP_ID_L_VALUE }; 1066 1066 unsigned int i; 1067 1067 u8 value; 1068 1068 int ret;