gpu: arm: midgard: r12p0_04rel0: Fix build warning about devfreq cooling device
authorChanwoo Choi <cw00.choi@samsung.com>
Tue, 14 Jul 2015 09:53:42 +0000 (18:53 +0900)
committerJoonyoung Shim <jy0922.shim@samsung.com>
Thu, 7 Jul 2016 06:39:33 +0000 (15:39 +0900)
This patch fixes the build warning according to new devfreq_cooling device
driver and make the frequency table as descending order.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[jy0922.shim: apply to midgard r12p0_04rel0]
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
drivers/gpu/arm/midgard/r12p0_04rel0/backend/gpu/mali_kbase_devfreq.c
drivers/gpu/arm/midgard/r12p0_04rel0/mali_kbase_defs.h

index 531c432..1b2313a 100644 (file)
@@ -163,8 +163,9 @@ static int kbase_devfreq_init_freq_table(struct kbase_device *kbdev,
                return -ENOMEM;
 
        rcu_read_lock();
-       for (i = 0; i < count; i++, freq++) {
-               opp = dev_pm_opp_find_freq_ceil(kbdev->dev, &freq);
+       freq = ULONG_MAX;
+       for (i = 0; i < count; i++, freq--) {
+               opp = dev_pm_opp_find_freq_floor(kbdev->dev, &freq);
                if (IS_ERR(opp))
                        break;
 
index 9bb5ea2..96403fb 100644 (file)
@@ -1012,7 +1012,7 @@ struct kbase_device {
        unsigned long current_freq;
        unsigned long current_voltage;
 #ifdef CONFIG_DEVFREQ_THERMAL
-       struct devfreq_cooling_device *devfreq_cooling;
+       struct thermal_cooling_device *devfreq_cooling;
 #endif
 #endif