]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
power: supply: core: constify psy_tzd_ops
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 28 Aug 2024 18:04:29 +0000 (20:04 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 28 Aug 2024 22:11:31 +0000 (00:11 +0200)
This struct is never modified, so mark it const.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240828-power-supply-const-psy_tzd_ops-v1-1-dc27176fda5b@weissschuh.net
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/power_supply_core.c

index 2b845ac5115773585488f9ab4d5921bcec1d909a..3614d263ddada354d30a8a70f16d3f9a340086ff 100644 (file)
@@ -1295,7 +1295,7 @@ static int power_supply_read_temp(struct thermal_zone_device *tzd,
        return ret;
 }
 
-static struct thermal_zone_device_ops psy_tzd_ops = {
+static const struct thermal_zone_device_ops psy_tzd_ops = {
        .get_temp = power_supply_read_temp,
 };