summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lochnagar-hwmon.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2023-04-06 22:30:25 +0200
committerGuenter Roeck <linux@roeck-us.net>2023-04-19 16:08:36 +0200
commitbf36b752ca464582a0ec67fedf647d841071320e (patch)
treeac75d022427c3cb628ad83f8a9a7d9f2138ae832 /drivers/hwmon/lochnagar-hwmon.c
parenthwmon: lm95245: constify pointers to hwmon_channel_info (diff)
downloadlinux-bf36b752ca464582a0ec67fedf647d841071320e.tar.xz
linux-bf36b752ca464582a0ec67fedf647d841071320e.zip
hwmon: lochnagar: 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: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/lochnagar-hwmon.c')
-rw-r--r--drivers/hwmon/lochnagar-hwmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/lochnagar-hwmon.c b/drivers/hwmon/lochnagar-hwmon.c
index 8b19adf2eeb0..9948e2f7208d 100644
--- a/drivers/hwmon/lochnagar-hwmon.c
+++ b/drivers/hwmon/lochnagar-hwmon.c
@@ -321,7 +321,7 @@ static const struct hwmon_ops lochnagar_ops = {
.write = lochnagar_write,
};
-static const struct hwmon_channel_info *lochnagar_info[] = {
+static const struct hwmon_channel_info * const lochnagar_info[] = {
HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT),
HWMON_CHANNEL_INFO(in, HWMON_I_INPUT | HWMON_I_LABEL,
HWMON_I_INPUT | HWMON_I_LABEL,