thermal compile ok for kernel 4.4
authorTao Zeng <tao.zeng@amlogic.com>
Tue, 21 Feb 2017 06:27:45 +0000 (14:27 +0800)
committerJiyu Yang <jiyu.yang@amlogic.com>
Tue, 21 Feb 2017 06:31:15 +0000 (14:31 +0800)
PD#131267 kernel 4.4 bringup
Change-Id: I3601e6eed68e6843669d472154a2f422a753771d

midgard/r11p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c
midgard/r12p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c
t83x/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c

index 987043d9dd025a32365a8eb4dec83416c27b76fd..1267b6faf02136e754458800d380abbd1efb727b 100755 (executable)
@@ -16,6 +16,7 @@
 
 
 #ifdef CONFIG_DEVFREQ_THERMAL
+#include <linux/version.h>
 #include <linux/devfreq_cooling.h>
 #include <linux/thermal.h>
 
@@ -81,8 +82,11 @@ static unsigned long t83x_dynamic_power(unsigned long freq,
 
        return (coefficient * v2 * f_mhz) / 1000000; /* mW */
 }
-
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 16))
 struct devfreq_cooling_ops t83x_model_ops = {
+#else
+struct devfreq_cooling_power t83x_model_ops = {
+#endif
        .get_static_power = t83x_static_power,
        .get_dynamic_power = t83x_dynamic_power,
 };
index 987043d9dd025a32365a8eb4dec83416c27b76fd..1267b6faf02136e754458800d380abbd1efb727b 100755 (executable)
@@ -16,6 +16,7 @@
 
 
 #ifdef CONFIG_DEVFREQ_THERMAL
+#include <linux/version.h>
 #include <linux/devfreq_cooling.h>
 #include <linux/thermal.h>
 
@@ -81,8 +82,11 @@ static unsigned long t83x_dynamic_power(unsigned long freq,
 
        return (coefficient * v2 * f_mhz) / 1000000; /* mW */
 }
-
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 16))
 struct devfreq_cooling_ops t83x_model_ops = {
+#else
+struct devfreq_cooling_power t83x_model_ops = {
+#endif
        .get_static_power = t83x_static_power,
        .get_dynamic_power = t83x_dynamic_power,
 };
index 987043d9dd025a32365a8eb4dec83416c27b76fd..1267b6faf02136e754458800d380abbd1efb727b 100755 (executable)
@@ -16,6 +16,7 @@
 
 
 #ifdef CONFIG_DEVFREQ_THERMAL
+#include <linux/version.h>
 #include <linux/devfreq_cooling.h>
 #include <linux/thermal.h>
 
@@ -81,8 +82,11 @@ static unsigned long t83x_dynamic_power(unsigned long freq,
 
        return (coefficient * v2 * f_mhz) / 1000000; /* mW */
 }
-
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 16))
 struct devfreq_cooling_ops t83x_model_ops = {
+#else
+struct devfreq_cooling_power t83x_model_ops = {
+#endif
        .get_static_power = t83x_static_power,
        .get_dynamic_power = t83x_dynamic_power,
 };