Skip to content

Commit d00caa5

Browse files
krzkalexandrebelloni
authored andcommitted
rtc: ds3232: constify pointers to hwmon_channel_info
Statically allocated array of pointers to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230511175609.282191-2-krzysztof.kozlowski@linaro.org Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent 973ef08 commit d00caa5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/rtc/rtc-ds3232.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ static const struct hwmon_channel_info ds3232_hwmon_temp = {
359359
.config = ds3232_hwmon_temp_config,
360360
};
361361

362-
static const struct hwmon_channel_info *ds3232_hwmon_info[] = {
362+
static const struct hwmon_channel_info * const ds3232_hwmon_info[] = {
363363
&ds3232_hwmon_chip,
364364
&ds3232_hwmon_temp,
365365
NULL

0 commit comments

Comments
 (0)