include/linux/thermal.h | 4 ++++ 1 file changed, 4 insertions(+)
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@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202605301554.S9n45bfQ-lkp@intel.com/
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
---
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
On Mon, Jun 1, 2026 at 11:02 AM Daniel Lezcano
<daniel.lezcano@kernel.org> wrote:
>
> 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@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202605301554.S9n45bfQ-lkp@intel.com/
> Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
> ---
> 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
>
© 2016 - 2026 Red Hat, Inc.