[PATCH] thermal/core: Fix missing stub for devm_thermal_cooling_device_register
From: Daniel Lezcano
Date: Mon Jun 01 2026 - 05:03:47 EST
Even it is very unlikely the thermal framework is disabled, the newly
added devm_thermal_cooling_device_register() function has not the stub
when the thermal framework is optout in the kernel.
Add it.
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202605301554.S9n45bfQ-lkp@xxxxxxxxx/
Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
---
include/linux/thermal.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 81be6e6061b3..083b4f533933 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -344,7 +344,11 @@ static inline struct thermal_cooling_device *
thermal_cooling_device_register(const char *type, void *devdata,
const struct thermal_cooling_device_ops *ops)
{ return ERR_PTR(-ENODEV); }
+
static inline struct thermal_cooling_device *
+devm_thermal_cooling_device_register(struct device *dev, const char *type, void *devdata,
+ const struct thermal_cooling_device_ops *ops)
+{ return ERR_PTR(-ENODEV); }
static inline void thermal_cooling_device_unregister(
struct thermal_cooling_device *cdev)
--
2.43.0