]> www.infradead.org Git - users/jedix/linux-maple.git/commit
thermal: core: Mark thermal zones as exiting before unregistration
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 4 Oct 2024 19:26:12 +0000 (21:26 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 22 Oct 2024 10:07:33 +0000 (12:07 +0200)
commit1dae3e70b473adc32f81ca1be926440f9b1de9dc
tree248870db6d3639ee0c130a3b981ddd1f744799bf
parentd07700b474d38ea4b1130e37d28379fc202054fa
thermal: core: Mark thermal zones as exiting before unregistration

In analogy with a previous change in the thermal zone registration code
path, to ensure that __thermal_zone_device_update() will return early
for thermal zones that are going away, introduce a thermal zone state
flag representing the "exit" state and set it while deleting the thermal
zone from thermal_tz_list.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/4394176.ejJDZkT8p0@rjwysocki.net
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
drivers/thermal/thermal_core.c
drivers/thermal/thermal_core.h