thermal/core: Decouple release paths for tz and cdev
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 13 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | thermal/core: Add dedicated release callback for cooling devicesdrivers/ | +11 | 1 reply | |
| 2/4 | thermal/core: Add dedicated release callback for thermal zonesdrivers/ | +12 | 1 reply | |
| 3/4 | thermal/core: Allocate the thermal class dynamicallydrivers/ | +8 | 5 replies | |
| 4/4 | thermal/core: Use the thermal class pointer as init guarddrivers/ | +4 | 1 reply |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Lukasz Luba |
|---|---|
| 1/4 | R-b |
| 2/4 | R-b |
| 3/4 | R-b |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
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