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

power: supply: ab8500: constify ocv 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-6-c1f721927048@weissschuh.net
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

authored by

Thomas Weißschuh and committed by
Sebastian Reichel
b7b6bf44 ce20d5b9

+1 -1
+1 -1
drivers/power/supply/ab8500_bmdata.c
··· 16 16 /* Default: temperature hysteresis */ 17 17 #define AB8500_TEMP_HYSTERESIS 3 18 18 19 - static struct power_supply_battery_ocv_table ocv_cap_tbl[] = { 19 + static const struct power_supply_battery_ocv_table ocv_cap_tbl[] = { 20 20 { .ocv = 4186000, .capacity = 100}, 21 21 { .ocv = 4163000, .capacity = 99}, 22 22 { .ocv = 4114000, .capacity = 95},