thermal/core: Fix missing stub for devm_thermal_cooling_device_register
Daniel Lezcano
maintainerPATCH 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.
Reported-by kernel test robot <[email protected]>
Signed-off-by Daniel Lezcano <[email protected]>
--- include/linux/thermal.h | 4 ++++ 1 file changed, 4 insertions(+)
include/linux/thermal.h +4 -0
@@ -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
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.
Reported-by kernel test robot <[email protected]>Signed-off-by Daniel Lezcano <[email protected]>
Quoted 23 lines
--- include/linux/thermal.h | 4 ++++ 1 file changed, 4 insertions(+)include/linux/thermal.h +4
-1@@ -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