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

hwmon: (ina238) Constify struct regmap_config

`ina238_regmap_config` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240702-hwmon-const-regmap-v1-1-63f6d4765fe0@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Javier Carrasco and committed by
Guenter Roeck
9d047eb0 39b24cce

+1 -1
+1 -1
drivers/hwmon/ina238.c
··· 96 96 #define INA238_BUS_VOLTAGE_LSB 3125 /* 3.125 mV/lsb */ 97 97 #define INA238_DIE_TEMP_LSB 125 /* 125 mC/lsb */ 98 98 99 - static struct regmap_config ina238_regmap_config = { 99 + static const struct regmap_config ina238_regmap_config = { 100 100 .max_register = INA238_REGISTERS, 101 101 .reg_bits = 8, 102 102 .val_bits = 16,