hwmon: k10temp: constify pointers to hwmon_channel_info
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 6 Apr 2023 20:30:18 +0000 (22:30 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 19 Apr 2023 14:08:36 +0000 (07:08 -0700)
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>
drivers/hwmon/k10temp.c

index be8bbb1c3a02d9ab58387ce55d62fa6eff013130..ba2f6a4f8c167f9676775f165e8a01a9d3aa88cb 100644 (file)
@@ -334,7 +334,7 @@ static bool has_erratum_319(struct pci_dev *pdev)
               (boot_cpu_data.x86_model == 4 && boot_cpu_data.x86_stepping <= 2);
 }
 
-static const struct hwmon_channel_info *k10temp_info[] = {
+static const struct hwmon_channel_info * const k10temp_info[] = {
        HWMON_CHANNEL_INFO(temp,
                           HWMON_T_INPUT | HWMON_T_MAX |
                           HWMON_T_CRIT | HWMON_T_CRIT_HYST |