]> www.infradead.org Git - users/willy/xarray.git/commit
thermal: core: Check passive delay in monitor_thermal_zone()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 26 Aug 2024 16:32:36 +0000 (18:32 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 5 Sep 2024 10:33:21 +0000 (12:33 +0200)
commit3c3ee53df47605476b9ff86a5abc6057b72be89c
treef7a32da54a4eedbb2f43aea950d9460df79b82ea
parentfcfacd544b74ee76de6fd8642340345669da407b
thermal: core: Check passive delay in monitor_thermal_zone()

The only case in which thermal_zone_device_set_polling() is called
with its second argument equal to zero is when passive cooling is
under way and passive_delay_jiffies is 0, which only happens when
the given thermal zone is not polled at all.

If monitor_thermal_zone() is modified to check passive_delay_jiffies
directly, the check of the thermal_zone_device_set_polling() second
argument against 0 can be dropped and a passive_delay check can be
dropped from thermal_zone_device_register_with_trips(), so change the
code accordingly.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/2004353.PYKUYFuaPT@rjwysocki.net
drivers/thermal/thermal_core.c