aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2020-08-31 20:22:23 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2020-12-05 21:24:52 +0100
commit7fdef97a56921f8cf62184de7d9bae8dee9ef3f5 (patch)
tree65a02cbaff24346ced2f5438adf64869e369b529
parent57e8da2a9da018e15c8210b551d458c01c5f08a0 (diff)
downloadbackports-7fdef97a56921f8cf62184de7d9bae8dee9ef3f5.tar.gz
header: dummy implementation for thermal_zone_device_enable
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>
-rw-r--r--backport/backport-include/linux/thermal.h10
1 files changed, 10 insertions, 0 deletions
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 */