From: Tao Zeng Date: Tue, 21 Feb 2017 06:27:45 +0000 (+0800) Subject: thermal compile ok for kernel 4.4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=65081d46dcbbedffe63379517dd48f9488afecc8;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_mali-driver.git thermal compile ok for kernel 4.4 PD#131267 kernel 4.4 bringup Change-Id: I3601e6eed68e6843669d472154a2f422a753771d --- diff --git a/midgard/r11p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c b/midgard/r11p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c index 987043d..1267b6f 100755 --- a/midgard/r11p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c +++ b/midgard/r11p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c @@ -16,6 +16,7 @@ #ifdef CONFIG_DEVFREQ_THERMAL +#include #include #include @@ -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, }; diff --git a/midgard/r12p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c b/midgard/r12p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c index 987043d..1267b6f 100755 --- a/midgard/r12p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c +++ b/midgard/r12p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c @@ -16,6 +16,7 @@ #ifdef CONFIG_DEVFREQ_THERMAL +#include #include #include @@ -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, }; diff --git a/t83x/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c b/t83x/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c index 987043d..1267b6f 100755 --- a/t83x/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c +++ b/t83x/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c @@ -16,6 +16,7 @@ #ifdef CONFIG_DEVFREQ_THERMAL +#include #include #include @@ -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, };