summaryrefslogtreecommitdiff
path: root/backport/backport-include/linux/thermal.h
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2018-02-18 15:24:50 +0200
committerJohannes Berg <johannes.berg@intel.com>2018-02-23 12:33:09 +0100
commit783d3c5354b91d6432185c99cfb48f34120b2da5 (patch)
tree5912d14eac8f6cbd4ef7c6f69b873c52b6063482 /backport/backport-include/linux/thermal.h
parent33c41fd8ebdd05f3f9e78a331844b5c5419e5276 (diff)
compat: only define thermal backports if CONFIG_THERMAL is enabled
If CONFIG_THERMAL is not enabled, we don't have to add all backports for the thermal framework. Actually this doesn't even work because we try to use thermal_zone_device_register/unregister and they are not present in the outer kernel, causing undefined symbols warnings: WARNING: "thermal_zone_device_register" [/home/luca/iwlwifi/stack-dev/compat/compat.ko] undefined! WARNING: "thermal_zone_device_unregister" [/home/luca/iwlwifi/stack-dev/compat/compat.ko] undefined! Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport/backport-include/linux/thermal.h')
-rw-r--r--backport/backport-include/linux/thermal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/backport/backport-include/linux/thermal.h b/backport/backport-include/linux/thermal.h
index 108a8cfe..8874e196 100644
--- a/backport/backport-include/linux/thermal.h
+++ b/backport/backport-include/linux/thermal.h
@@ -3,6 +3,7 @@
#include_next <linux/thermal.h>
#include <linux/version.h>
+#ifdef CONFIG_THERMAL
#if LINUX_VERSION_IS_LESS(3,8,0)
#include <linux/errno.h>
@@ -110,5 +111,6 @@ void backport_thermal_zone_device_unregister(struct thermal_zone_device *);
#endif /* LINUX_VERSION_IS_LESS(4,3,0) */
#endif /* ! < 3.8.0 */
+#endif /* CONFIG_THERMAL */
#endif /* __BACKPORT_LINUX_THERMAL_H */