diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-05-28 17:00:51 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-06-11 21:04:40 +0200 |
commit | f41f23b0cae1d069c680dd9e5e2cd42db8ff6dfc (patch) | |
tree | aa73a85ad9be650d192a5dd463aeae963628865a /drivers/thermal/thermal_sysfs.c | |
parent | thermal/debugfs: Move some statements from under thermal_dbg->lock (diff) | |
download | linux-f41f23b0cae1d069c680dd9e5e2cd42db8ff6dfc.tar.xz linux-f41f23b0cae1d069c680dd9e5e2cd42db8ff6dfc.zip |
thermal: trip: Use common set of trip type names
Use the same set of trip type names in sysfs and in the thermal debug
code output.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/thermal/thermal_sysfs.c')
-rw-r--r-- | drivers/thermal/thermal_sysfs.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index 88211ccdfbd6..e65bbbbf0054 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c @@ -88,18 +88,7 @@ trip_point_type_show(struct device *dev, struct device_attribute *attr, if (sscanf(attr->attr.name, "trip_point_%d_type", &trip_id) != 1) return -EINVAL; - switch (tz->trips[trip_id].trip.type) { - case THERMAL_TRIP_CRITICAL: - return sprintf(buf, "critical\n"); - case THERMAL_TRIP_HOT: - return sprintf(buf, "hot\n"); - case THERMAL_TRIP_PASSIVE: - return sprintf(buf, "passive\n"); - case THERMAL_TRIP_ACTIVE: - return sprintf(buf, "active\n"); - default: - return sprintf(buf, "unknown\n"); - } + return sprintf(buf, "%s\n", thermal_trip_type_name(tz->trips[trip_id].trip.type)); } static ssize_t |