Commit 0c15d66d authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Guenter Roeck
Browse files

hwmon: peci: constify pointers to hwmon_channel_info



Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 195030d3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -447,7 +447,7 @@ static const struct hwmon_ops peci_cputemp_ops = {
	.read = cputemp_read,
};

static const struct hwmon_channel_info *peci_cputemp_info[] = {
static const struct hwmon_channel_info * const peci_cputemp_info[] = {
	HWMON_CHANNEL_INFO(temp,
			   /* Die temperature */
			   HWMON_T_LABEL | HWMON_T_INPUT | HWMON_T_MAX |
+1 −1
Original line number Diff line number Diff line
@@ -300,7 +300,7 @@ static int create_dimm_temp_label(struct peci_dimmtemp *priv, int chan)
	return 0;
}

static const struct hwmon_channel_info *peci_dimmtemp_temp_info[] = {
static const struct hwmon_channel_info * const peci_dimmtemp_temp_info[] = {
	HWMON_CHANNEL_INFO(temp,
			   [0 ... DIMM_NUMS_MAX - 1] = HWMON_T_LABEL |
				HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_CRIT),