From 75e80cf904de0a20a7a27c4f2629f7763fe3f6e6 Mon Sep 17 00:00:00 2001 From: Arne Coucheron Date: Sat, 25 Jul 2015 21:26:17 +0200 Subject: [PATCH 1/2] Fix thermal driver --- drivers/amlogic/Makefile | 2 +- drivers/amlogic/thermal/Makefile | 3 ++- drivers/thermal/gpu_cooling.c | 2 ++ include/linux/thermal.h | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/amlogic/Makefile b/drivers/amlogic/Makefile index b72e45bd8bd96a..c65a3e504a0a9c 100755 --- a/drivers/amlogic/Makefile +++ b/drivers/amlogic/Makefile @@ -75,7 +75,7 @@ obj-$(CONFIG_TVIN) += tvin/ obj-$(CONFIG_AML_EXT_HDMIIN) += ext_hdmiin/ -#obj-y += thermal/ +obj-y += thermal/ #####Sound system is later init in kernel default..###################### diff --git a/drivers/amlogic/thermal/Makefile b/drivers/amlogic/thermal/Makefile index 5b55a48a18149e..8b01d170af0acd 100644 --- a/drivers/amlogic/thermal/Makefile +++ b/drivers/amlogic/thermal/Makefile @@ -1,4 +1,5 @@ # #Makefile for the thermal dirver # -obj-$(CONFIG_AMLOGIC_THERMAL)+= amlogic_thermal.o +obj-$(CONFIG_AML_PLATFORM_THERMAL)+= amlogic_thermal.o + diff --git a/drivers/thermal/gpu_cooling.c b/drivers/thermal/gpu_cooling.c index 33ea6ea7c1a526..8c89e875c51dad 100755 --- a/drivers/thermal/gpu_cooling.c +++ b/drivers/thermal/gpu_cooling.c @@ -235,6 +235,7 @@ void gpufreq_cooling_unregister(struct thermal_cooling_device *cdev) } EXPORT_SYMBOL_GPL(gpufreq_cooling_unregister); +#if defined(CONFIG_AML_VIRTUAL_THERMAL) && !defined(CONFIG_AML_PLATFORM_THERMAL) unsigned int (*gpu_freq_callback)(void) = NULL; int register_gpu_freq_info(unsigned int (*fun)(void)) { @@ -245,3 +246,4 @@ int register_gpu_freq_info(unsigned int (*fun)(void)) } EXPORT_SYMBOL(register_gpu_freq_info); EXPORT_SYMBOL(gpu_freq_callback); +#endif diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 098d49d220a09e..8df1ef7fc7cd5d 100755 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -259,7 +259,7 @@ static inline int thermal_generate_netlink_event(struct thermal_zone_device *tz, } #endif -#ifdef CONFIG_AMLOGIC_THERMAL +#ifdef CONFIG_AML_PLATFORM_THERMAL #include #endif /* CONFIG_AMLOGIC_THERMAL */ From 3a531de95ec55a0c629a448cdb289e9990f691e1 Mon Sep 17 00:00:00 2001 From: Immanuel Klinkenberg Date: Wed, 20 Jul 2016 21:31:24 +0200 Subject: [PATCH 2/2] Comment adapted to corresponding #ifdef --- include/linux/thermal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 8df1ef7fc7cd5d..3a56611fcc247d 100755 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -261,6 +261,6 @@ static inline int thermal_generate_netlink_event(struct thermal_zone_device *tz, #ifdef CONFIG_AML_PLATFORM_THERMAL #include -#endif /* CONFIG_AMLOGIC_THERMAL */ +#endif /* CONFIG_AML_PLATFORM_THERMAL */ #endif /* __THERMAL_H__ */