From 77ea7c3706d51216fa592982e38c29eb7a06bd15 Mon Sep 17 00:00:00 2001 From: Chungwoo Park Date: Tue, 15 May 2018 21:52:48 +0900 Subject: [PATCH] [COMMON] cpufreq: acme: Move cooling register to cpufreq_init cpufreq->exit() callback will be called at disable_nonboot_cpus() Then, wakeup_source is activated by cooling_unregister. So, we moved cooling_register at exynos_cpuferq_init() as before. Change-Id: Ic92c602d7616a99da4e272a5feb656c51b1757da Signed-off-by: Hyeonseong Gil --- drivers/cpufreq/exynos-acme.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/cpufreq/exynos-acme.c b/drivers/cpufreq/exynos-acme.c index 959a2220b160..a5e205534f73 100644 --- a/drivers/cpufreq/exynos-acme.c +++ b/drivers/cpufreq/exynos-acme.c @@ -466,24 +466,10 @@ static int exynos_cpufreq_resume(struct cpufreq_policy *policy) static void exynos_cpufreq_ready(struct cpufreq_policy *policy) { - struct exynos_cpufreq_domain *domain = find_domain(policy->cpu); - - domain->cdev = exynos_cpufreq_cooling_register(domain->dn, policy); - if (IS_ERR(domain->cdev)) { - pr_err("running cpufreq without cooling device: %ld\n", - PTR_ERR(domain->cdev)); - - domain->cdev = NULL; - } } static int exynos_cpufreq_exit(struct cpufreq_policy *policy) { - struct exynos_cpufreq_domain *domain = find_domain(policy->cpu); - - if (domain->cdev) - cpufreq_cooling_unregister(domain->cdev); - return 0; } @@ -1686,7 +1672,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; enable_domain(domain); + policy = cpufreq_cpu_get_raw(cpumask_first(&domain->cpus)); + if (policy) + exynos_cpufreq_cooling_register(domain->dn, policy); + set_boot_qos(domain); } -- 2.20.1