Skip to content

Commit b191189

Browse files
krzkalexandrebelloni
authored andcommitted
rtc: rv3032: 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-4-krzysztof.kozlowski@linaro.org Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent 303b1e8 commit b191189

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/rtc/rtc-rv3032.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ static int rv3032_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
842842
return err;
843843
}
844844

845-
static const struct hwmon_channel_info *rv3032_hwmon_info[] = {
845+
static const struct hwmon_channel_info * const rv3032_hwmon_info[] = {
846846
HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ),
847847
HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_MAX_HYST),
848848
NULL

0 commit comments

Comments
 (0)