summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2023-04-06 22:38:18 +0200
committerGuenter Roeck <linux@roeck-us.net>2023-04-19 07:08:38 -0700
commit11c1dff58c65ee6a5cbfa19af049ee8af01a91c6 (patch)
tree4ce9e55263565ac2afcd38c8458689a65732bbaf /drivers/hwmon
parent1ff3d23d00184dc350394e3ca53fdce87daa1bc1 (diff)
downloadlinux-11c1dff58c65ee6a5cbfa19af049ee8af01a91c6.tar.gz
hwmon: sht4x: 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')
-rw-r--r--drivers/hwmon/sht4x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/sht4x.c b/drivers/hwmon/sht4x.c
index 13e042927bf8..5bbe09135ab9 100644
--- a/drivers/hwmon/sht4x.c
+++ b/drivers/hwmon/sht4x.c
@@ -214,7 +214,7 @@ static int sht4x_hwmon_write(struct device *dev, enum hwmon_sensor_types type,
}
}
-static const struct hwmon_channel_info *sht4x_info[] = {
+static const struct hwmon_channel_info * const sht4x_info[] = {
HWMON_CHANNEL_INFO(chip, HWMON_C_UPDATE_INTERVAL),
HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT),
HWMON_CHANNEL_INFO(humidity, HWMON_H_INPUT),