[PATCH 11/30] header: dummy implementation for thermal_zone_device_enable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 backport/backport-include/linux/thermal.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

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 */
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux