From: Krzysztof Kozlowski Date: Thu, 6 Apr 2023 20:38:18 +0000 (+0200) Subject: hwmon: sht4x: constify pointers to hwmon_channel_info X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=11c1dff58c65ee6a5cbfa19af049ee8af01a91c6;p=linux.git 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 Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/sht4x.c b/drivers/hwmon/sht4x.c index 13e042927bf89..5bbe09135ab9d 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),