aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2023-04-07 17:01:21 +0200
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2023-05-08 12:16:38 +0200
commit0df2a5e99d0cb10a3da93fd71dd6753af5adc79f (patch)
tree799e02f867849dfae4f154f451dbae9f34a22b82 /drivers/w1
parent51cbbcd6469b2a32e222ec220039af20a16f2769 (diff)
downloadlinux-0df2a5e99d0cb10a3da93fd71dd6753af5adc79f.tar.gz
w1: therm: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Link: https://lore.kernel.org/r/20230407150121.79887-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/slaves/w1_therm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c
index ab7a411578f8f..c85e80c7e1307 100644
--- a/drivers/w1/slaves/w1_therm.c
+++ b/drivers/w1/slaves/w1_therm.c
@@ -454,7 +454,7 @@ static const struct hwmon_channel_info w1_temp = {
.config = w1_temp_config,
};
-static const struct hwmon_channel_info *w1_info[] = {
+static const struct hwmon_channel_info * const w1_info[] = {
&w1_temp,
NULL
};