]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
thermal/core: Fix missing stub for devm_thermal_cooling_device_register
authorDaniel Lezcano <daniel.lezcano@kernel.org>
Mon, 1 Jun 2026 09:01:53 +0000 (11:01 +0200)
committerDaniel Lezcano <daniel.lezcano@kernel.org>
Wed, 3 Jun 2026 07:13:00 +0000 (09:13 +0200)
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>
Link: https://patch.msgid.link/20260601090152.1243983-2-daniel.lezcano@kernel.org
include/linux/thermal.h

index 81be6e6061b3f2dcde352bcd7b8f0905c2134a5f..083b4f5339331da355b5277289257406fff5b46c 100644 (file)
@@ -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)