Skip to content

Commit 67fce59

Browse files
krzksre
authored andcommitted
power: supply: hwmon: constify pointers to hwmon_channel_info
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>
1 parent 32fe18d commit 67fce59

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/power/supply/power_supply_hwmon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ static const struct hwmon_ops power_supply_hwmon_ops = {
293293
.read_string = power_supply_hwmon_read_string,
294294
};
295295

296-
static const struct hwmon_channel_info *power_supply_hwmon_info[] = {
296+
static const struct hwmon_channel_info * const power_supply_hwmon_info[] = {
297297
HWMON_CHANNEL_INFO(temp,
298298
HWMON_T_LABEL |
299299
HWMON_T_INPUT |

0 commit comments

Comments
 (0)