diff options
author | Andrzej Pietrasiewicz <andrzej.p@collabora.com> | 2020-06-29 14:29:24 +0200 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2020-06-29 20:26:39 +0200 |
commit | 5d7bd8aa7c35873f448d60ffbd996cfa151d2a11 (patch) | |
tree | 8ac238d6c8de5a562a8f3fefedb7991dc79d2ddb /drivers/thermal/thermal_of.c | |
parent | thermal: core: Stop polling DISABLED thermal devices (diff) | |
download | linux-5d7bd8aa7c35873f448d60ffbd996cfa151d2a11.tar.xz linux-5d7bd8aa7c35873f448d60ffbd996cfa151d2a11.zip |
thermal: Simplify or eliminate unnecessary set_mode() methods
Setting polling_delay is now done at thermal_core level (by not polling
DISABLED devices), so no need to repeat this code.
int340x: Checking for an impossible enum value is unnecessary.
acpi/thermal: It only prints debug messages.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
[for acerhdf]
Acked-by: Peter Kaestle <peter@piie.net>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200629122925.21729-11-andrzej.p@collabora.com
Diffstat (limited to 'drivers/thermal/thermal_of.c')
-rw-r--r-- | drivers/thermal/thermal_of.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c index 43a516a35d64..69ef12f852b7 100644 --- a/drivers/thermal/thermal_of.c +++ b/drivers/thermal/thermal_of.c @@ -267,22 +267,6 @@ static int of_thermal_unbind(struct thermal_zone_device *thermal, return 0; } -static int of_thermal_set_mode(struct thermal_zone_device *tz, - enum thermal_device_mode mode) -{ - struct __thermal_zone *data = tz->devdata; - - if (mode == THERMAL_DEVICE_ENABLED) { - tz->polling_delay = data->polling_delay; - tz->passive_delay = data->passive_delay; - } else { - tz->polling_delay = 0; - tz->passive_delay = 0; - } - - return 0; -} - static int of_thermal_get_trip_type(struct thermal_zone_device *tz, int trip, enum thermal_trip_type *type) { @@ -374,8 +358,6 @@ static int of_thermal_get_crit_temp(struct thermal_zone_device *tz, } static struct thermal_zone_device_ops of_thermal_ops = { - .set_mode = of_thermal_set_mode, - .get_trip_type = of_thermal_get_trip_type, .get_trip_temp = of_thermal_get_trip_temp, .set_trip_temp = of_thermal_set_trip_temp, |