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;
}