mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
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>
This commit is contained in:
parent
49d7edc9bd
commit
ae008f6539
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user