Commit 96124610 authored by Cédric Le Goater's avatar Cédric Le Goater Committed by Guenter Roeck

hwmon: (ibmpowernv) replace AMBIENT_TEMP by TEMP

Ambient is too restrictive as there can be other temperature channels :
core, memory, etc.
Signed-off-by: default avatarCédric Le Goater <clg@fr.ibm.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent d720acac
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
*/ */
enum sensors { enum sensors {
FAN, FAN,
AMBIENT_TEMP, TEMP,
POWER_SUPPLY, POWER_SUPPLY,
POWER_INPUT, POWER_INPUT,
MAX_SENSOR_TYPE, MAX_SENSOR_TYPE,
...@@ -87,7 +87,7 @@ static ssize_t show_sensor(struct device *dev, struct device_attribute *devattr, ...@@ -87,7 +87,7 @@ static ssize_t show_sensor(struct device *dev, struct device_attribute *devattr,
return ret; return ret;
/* Convert temperature to milli-degrees */ /* Convert temperature to milli-degrees */
if (sdata->type == AMBIENT_TEMP) if (sdata->type == TEMP)
x *= 1000; x *= 1000;
/* Convert power to micro-watts */ /* Convert power to micro-watts */
else if (sdata->type == POWER_INPUT) else if (sdata->type == POWER_INPUT)
...@@ -154,7 +154,7 @@ static int create_hwmon_attr_name(struct device *dev, enum sensors type, ...@@ -154,7 +154,7 @@ static int create_hwmon_attr_name(struct device *dev, enum sensors type,
} else if (!strcmp(attr_suffix, DT_DATA_ATTR_SUFFIX)) { } else if (!strcmp(attr_suffix, DT_DATA_ATTR_SUFFIX)) {
attr_name = "input"; attr_name = "input";
} else if (!strcmp(attr_suffix, DT_THRESHOLD_ATTR_SUFFIX)) { } else if (!strcmp(attr_suffix, DT_THRESHOLD_ATTR_SUFFIX)) {
if (type == AMBIENT_TEMP) if (type == TEMP)
attr_name = "max"; attr_name = "max";
else if (type == FAN) else if (type == FAN)
attr_name = "min"; attr_name = "min";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment