cpufreq: acme: register cpufreq cooling device
authorEunseok Choi <es10.choi@samsung.com>
Tue, 23 Jan 2018 13:19:24 +0000 (22:19 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:30:37 +0000 (17:30 +0900)
Change-Id: I039e4db41c7db0a634e0e35d77000c576d63c514
Signed-off-by: Eunseok Choi <es10.choi@samsung.com>
drivers/cpufreq/exynos-acme.c

index 4f6991d9b9b8113215ecf94a39598facb48cffba..4e3cd606390a31b5b1a8078ce89f19bbf1fb22a2 100644 (file)
@@ -1648,11 +1648,12 @@ static int __init exynos_cpufreq_init(void)
         * Update frequency as soon as domain is enabled.
         */
        list_for_each_entry(domain, &domains, list) {
-               struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpumask_first(&domain->cpus));
+               struct cpufreq_policy *policy;
                set_policy(domain);
                enable_domain(domain);
-               if (!policy)
-                       cpufreq_cooling_register(policy);
+               policy = cpufreq_cpu_get_raw(cpumask_first(&domain->cpus));
+               if (policy)
+                       exynos_cpufreq_cooling_register(domain->dn, policy);
 
                set_boot_qos(domain);
        }