Skip to content

Commit

Permalink
power: supply: hwmon: constify pointers to hwmon_channel_info
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
krzk authored and sre committed May 8, 2023
1 parent 32fe18d commit 67fce59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/supply/power_supply_hwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down

0 comments on commit 67fce59

Please sign in to comment.