]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
thermal/core: Allocate the thermal class dynamically
authorDaniel Lezcano <daniel.lezcano@oss.qualcomm.com>
Fri, 8 May 2026 18:05:10 +0000 (20:05 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 13 May 2026 19:03:22 +0000 (21:03 +0200)
commit34f54003643e907e2e5d0433e81a6fbfc419fd88
tree839f5f24dbfc67335b69e477344311029017ca53
parentdc04e81fa2188d96af0c795ff45e4e5a209183b2
thermal/core: Allocate the thermal class dynamically

Use class_create() instead of a statically allocated struct class.

This allows the thermal class to be managed through a dynamically
allocated class object and avoids keeping a static class instance
around.

Signed-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
[ rjw: Added __ro_after_init to thermal_class ]
[ rjw: Used temporary local var to store class_create() return value ]
Link: https://patch.msgid.link/20260508180511.1306659-4-daniel.lezcano@oss.qualcomm.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/thermal_core.c