Skip to content

thermal/core: Decouple release paths for tz and cdev

Daniel Lezcano linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4thermal/core: Add dedicated release callback for cooling devicesdrivers/thermal/thermal_core.c+11 -81 reply
2/4thermal/core: Add dedicated release callback for thermal zonesdrivers/thermal/thermal_core.c+12 -161 reply
3/4thermal/core: Allocate the thermal class dynamicallydrivers/thermal/thermal_core.c+8 -75 replies
4/4thermal/core: Use the thermal class pointer as init guarddrivers/thermal/thermal_core.c+4 -71 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchLukasz Luba
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] thermal/core: Decouple release paths for tz and cdev

This series cleans up the lifetime handling of thermal devices.

Currently, the thermal class release callback handles both thermal zones and cooling devices by checking the device name prefix. This approach is fragile and mixes responsibilities across different object types.

The first two patches introduce dedicated struct device release callbacks for thermal zones and cooling devices. This removes the need to rely on device names and keeps the lifetime management local to each object.

The last two patches convert the thermal class to a dynamically allocated object and simplify the initialization logic by using the class pointer itself as a guard instead of a separate boolean flag.

Overall, this results in a clearer separation of responsibilities and more robust lifetime management aligned with the device model.

No functional change intended.

---

Daniel Lezcano (4):
thermal/core: Add dedicated release callback for cooling devices thermal/core: Add dedicated release callback for thermal zones thermal/core: Allocate the thermal class dynamically thermal/core: Use the thermal class pointer as init guard

 drivers/thermal/thermal_core.c | 73 ++++++++++++++++------------------
 1 file changed, 35 insertions(+), 38 deletions(-)
Signature · 1 line
2.43.0