Skip to content

Commit fcfacd5

Browse files
committed
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 <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 49029b5 commit fcfacd5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/thermal/thermal_core.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,7 @@ static void thermal_zone_recheck(struct thermal_zone_device *tz, int error)
364364

365365
static void monitor_thermal_zone(struct thermal_zone_device *tz)
366366
{
367-
if (tz->mode != THERMAL_DEVICE_ENABLED)
368-
thermal_zone_device_set_polling(tz, 0);
369-
else if (tz->passive > 0)
367+
if (tz->passive > 0)
370368
thermal_zone_device_set_polling(tz, tz->passive_delay_jiffies);
371369
else if (tz->polling_delay_jiffies)
372370
thermal_zone_device_set_polling(tz, tz->polling_delay_jiffies);

0 commit comments

Comments
 (0)