]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
power: supply: sc27xx: use const reference to ocv table
authorThomas Weißschuh <linux@weissschuh.net>
Sat, 5 Oct 2024 10:04:20 +0000 (12:04 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 15 Oct 2024 20:14:12 +0000 (22:14 +0200)
The table is not modified, so constify the reference.
This enables a constification in the power supply core.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20241005-power-supply-battery-const-v1-4-c1f721927048@weissschuh.net
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/sc27xx_fuel_gauge.c

index bd23c4d9fed43482e972ccc086311e7bfcec2d54..426d423b935b581a7673be076ae71b8899f17e2e 100644 (file)
@@ -992,7 +992,7 @@ static int sc27xx_fgu_calibration(struct sc27xx_fgu_data *data)
 static int sc27xx_fgu_hw_init(struct sc27xx_fgu_data *data)
 {
        struct power_supply_battery_info *info;
-       struct power_supply_battery_ocv_table *table;
+       const struct power_supply_battery_ocv_table *table;
        int ret, delta_clbcnt, alarm_adc;
 
        ret = power_supply_get_battery_info(data->battery, &info);