The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/4] thermal/core: Decouple release paths for tz and cdev
@ 2026-05-08 18:05 Daniel Lezcano
  2026-05-08 18:05 ` [PATCH 1/4] thermal/core: Add dedicated release callback for cooling devices Daniel Lezcano
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Daniel Lezcano @ 2026-05-08 18:05 UTC (permalink / raw)
  To: daniel.lezcano, lukasz.luba, rafael; +Cc: rui.zhang, linux-pm, linux-kernel

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(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-05-08 19:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-08 18:05 [PATCH 0/4] thermal/core: Decouple release paths for tz and cdev Daniel Lezcano
2026-05-08 18:05 ` [PATCH 1/4] thermal/core: Add dedicated release callback for cooling devices Daniel Lezcano
2026-05-08 18:05 ` [PATCH 2/4] thermal/core: Add dedicated release callback for thermal zones Daniel Lezcano
2026-05-08 18:05 ` [PATCH 3/4] thermal/core: Allocate the thermal class dynamically Daniel Lezcano
2026-05-08 18:24   ` Rafael J. Wysocki
2026-05-08 19:22     ` Daniel Lezcano
2026-05-08 19:26       ` Rafael J. Wysocki
2026-05-08 19:28         ` Daniel Lezcano
2026-05-08 18:05 ` [PATCH 4/4] thermal/core: Use the thermal class pointer as init guard Daniel Lezcano
2026-05-08 18:10 ` [PATCH 0/4] thermal/core: Decouple release paths for tz and cdev Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox