Skip to content

Commit ae008f6

Browse files
Giorgi Tchankvetadzejic23
authored andcommitted
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 <giorgitchankvetadze1997@gmail.com> Reviewed-by: Stepan Ionichev <sozdayvek@gmail.com> Acked-by: Maxwell Doose <m32285159@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent 49d7edc commit ae008f6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/iio/chemical/scd30_i2c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#define SCD30_I2C_MAX_BUF_SIZE 18
2121
#define SCD30_I2C_CRC8_POLYNOMIAL 0x31
2222

23-
static u16 scd30_i2c_cmd_lookup_tbl[] = {
23+
static const u16 scd30_i2c_cmd_lookup_tbl[] = {
2424
[CMD_START_MEAS] = 0x0010,
2525
[CMD_STOP_MEAS] = 0x0104,
2626
[CMD_MEAS_INTERVAL] = 0x4600,

0 commit comments

Comments
 (0)