power: supply: hwmon: constify pointers to hwmon_channel_info
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fri, 7 Apr 2023 15:03:26 +0000 (17:03 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 8 May 2023 13:33:16 +0000 (15:33 +0200)
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/power_supply_hwmon.c

index a48aa4a..c97893d 100644 (file)
@@ -293,7 +293,7 @@ static const struct hwmon_ops power_supply_hwmon_ops = {
        .read_string    = power_supply_hwmon_read_string,
 };
 
-static const struct hwmon_channel_info *power_supply_hwmon_info[] = {
+static const struct hwmon_channel_info * const power_supply_hwmon_info[] = {
        HWMON_CHANNEL_INFO(temp,
                           HWMON_T_LABEL     |
                           HWMON_T_INPUT     |