From: Giorgi Tchankvetadze Date: Fri, 8 May 2026 13:39:17 +0000 (+0400) Subject: iio: chemical: scd30: make command lookup table const X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae008f65398c2071b0b5510998d86f51d285a77d;p=thirdparty%2Fkernel%2Flinux.git iio: chemical: scd30: make command lookup table const scd30_i2c_cmd_lookup_tbl contains fixed opcodes and is only read by scd30_i2c_command(). Make it const to document that it's immutable and allow it to be placed in read-only memory. Signed-off-by: Giorgi Tchankvetadze Reviewed-by: Stepan Ionichev Acked-by: Maxwell Doose Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/chemical/scd30_i2c.c b/drivers/iio/chemical/scd30_i2c.c index 436df9c61a719..bf465cc71be7d 100644 --- a/drivers/iio/chemical/scd30_i2c.c +++ b/drivers/iio/chemical/scd30_i2c.c @@ -20,7 +20,7 @@ #define SCD30_I2C_MAX_BUF_SIZE 18 #define SCD30_I2C_CRC8_POLYNOMIAL 0x31 -static u16 scd30_i2c_cmd_lookup_tbl[] = { +static const u16 scd30_i2c_cmd_lookup_tbl[] = { [CMD_START_MEAS] = 0x0010, [CMD_STOP_MEAS] = 0x0104, [CMD_MEAS_INTERVAL] = 0x4600,