Skip to contentSkip to conversation

thermal/core: Fix missing stub for devm_thermal_cooling_device_register

PATCH In review Daniel Lezcano 2 participants 2 messages Jun 1 Thermal

lore
Share & tools
lore

Daniel Lezcano

author maintainer
#0 lore raw

PATCH 1/1 thermal/core: Fix missing stub for devm_thermal_cooling_device_register

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.

---
 include/linux/thermal.h | 4 ++++
 1 file changed, 4 insertions(+)
include/linux/thermal.h +4 -0
index 81be6e6061b3..083b4f533933 100644
@@ -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)
Signature · 1 line
2.43.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Daniel Lezcano

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.

Quoted 23 lines
---
 include/linux/thermal.h | 4 ++++
 1 file changed, 4 insertions(+)
include/linux/thermal.h +4 -1
index 81be6e6061b3..083b4f533933 100644
@@ -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