Skip to content

Commit 40d00fa

Browse files
t-8chsre
authored andcommitted
power: supply: ab8500: constify resistance table
The power supply core now allows this constification. Prevent accidental or malicious modification of the data. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20241005-power-supply-battery-const-v1-2-c1f721927048@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
1 parent 58797ab commit 40d00fa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/power/supply/ab8500_bmdata.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static struct power_supply_battery_ocv_table ocv_cap_tbl[] = {
4848
* temperature values to work. Factory resistance is 300 mOhm and the
4949
* resistance values to the right are percentages of 300 mOhm.
5050
*/
51-
static struct power_supply_resistance_temp_table temp_to_batres_tbl_thermistor[] = {
51+
static const struct power_supply_resistance_temp_table temp_to_batres_tbl_thermistor[] = {
5252
{ .temp = 40, .resistance = 40 /* 120 mOhm */ },
5353
{ .temp = 30, .resistance = 45 /* 135 mOhm */ },
5454
{ .temp = 20, .resistance = 55 /* 165 mOhm */ },

0 commit comments

Comments
 (0)