diff mbox series

[11/30] header: dummy implementation for thermal_zone_device_enable

Message ID 20201201220415.30582-12-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to match kernel 5.10-rc6 | expand

Commit Message

Hauke Mehrtens Dec. 1, 2020, 10:03 p.m. UTC
Just provide an empty implementation of the thermal zone functions, they
were not called in older versions of the driver any way.
These functions were added in upstream Linux commit ac5d9ecc74d8
("thermal: Add mode helpers").

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/linux/thermal.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/backport/backport-include/linux/thermal.h b/backport/backport-include/linux/thermal.h
index 8874e196..8ffe12aa 100644
--- a/backport/backport-include/linux/thermal.h
+++ b/backport/backport-include/linux/thermal.h
@@ -113,4 +113,14 @@  void backport_thermal_zone_device_unregister(struct thermal_zone_device *);
 #endif /* ! < 3.8.0 */
 #endif /* CONFIG_THERMAL */
 
+#if LINUX_VERSION_IS_LESS(5,9,0)
+#define thermal_zone_device_enable LINUX_BACKPORT(thermal_zone_device_enable)
+static inline int thermal_zone_device_enable(struct thermal_zone_device *tz)
+{ return 0; }
+
+#define thermal_zone_device_disable LINUX_BACKPORT(thermal_zone_device_disable)
+static inline int thermal_zone_device_disable(struct thermal_zone_device *tz)
+{ return 0; }
+#endif /* < 5.9 */
+
 #endif /* __BACKPORT_LINUX_THERMAL_H */