summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-08-26 18:31:32 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-09-05 12:33:18 +0200
commitfcfacd544b74ee76de6fd8642340345669da407b (patch)
tree0fc114a2fc5a766d9e7e80012c4d8072923a51da /drivers/thermal
parent49029b507e3ad9de35faca497c7bde0e83fcc036 (diff)
thermal: core: Drop dead code from monitor_thermal_zone()
Since monitor_thermal_zone() is only called when the given thermal zone has been enabled, as per the thermal_zone_device_is_enabled() check in __thermal_zone_device_update(), the tz->mode check in it always evaluates to "false" and the thermal_zone_device_set_polling() invocation depending on it is dead code, so drop it. No functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/10547425.nUPlyArG6x@rjwysocki.net
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/thermal_core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 9215a7bc92c7..2f11d271300a 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -364,9 +364,7 @@ static void thermal_zone_recheck(struct thermal_zone_device *tz, int error)
static void monitor_thermal_zone(struct thermal_zone_device *tz)
{
- if (tz->mode != THERMAL_DEVICE_ENABLED)
- thermal_zone_device_set_polling(tz, 0);
- else if (tz->passive > 0)
+ if (tz->passive > 0)
thermal_zone_device_set_polling(tz, tz->passive_delay_jiffies);
else if (tz->polling_delay_jiffies)
thermal_zone_device_set_polling(tz, tz->polling_delay_jiffies);