summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/dbx500-cpufreq.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2017-04-25 15:57:14 +0530
committerEduardo Valentin <edubezval@gmail.com>2017-05-27 17:32:24 -0700
commit4d753aa7b6279e4b7d338947a434689962f430d1 (patch)
tree07114a3ef8781b49b4254df85c3ca83e60c165f6 /drivers/cpufreq/dbx500-cpufreq.c
parent18f301c934db0f7bae4e7c12e941bce11d67aec5 (diff)
downloadblackbird-obmc-linux-4d753aa7b6279e4b7d338947a434689962f430d1.tar.gz
blackbird-obmc-linux-4d753aa7b6279e4b7d338947a434689962f430d1.zip
thermal: cpu_cooling: use cpufreq_policy to register cooling device
The CPU cooling driver uses the cpufreq policy, to get clip_cpus, the frequency table, etc. Most of the callers of CPU cooling driver's registration routines have the cpufreq policy with them, but they only pass the policy->related_cpus cpumask. The __cpufreq_cooling_register() routine then gets the policy by itself and uses it. It would be much better if the callers can pass the policy instead directly. This also fixes a basic design flaw, where the policy can be freed while the CPU cooling driver is still active. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Tested-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/cpufreq/dbx500-cpufreq.c')
-rw-r--r--drivers/cpufreq/dbx500-cpufreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c
index 3575b82210ba..4ee0431579c1 100644
--- a/drivers/cpufreq/dbx500-cpufreq.c
+++ b/drivers/cpufreq/dbx500-cpufreq.c
@@ -43,7 +43,7 @@ static int dbx500_cpufreq_exit(struct cpufreq_policy *policy)
static void dbx500_cpufreq_ready(struct cpufreq_policy *policy)
{
- cdev = cpufreq_cooling_register(policy->cpus);
+ cdev = cpufreq_cooling_register(policy);
if (IS_ERR(cdev))
pr_err("Failed to register cooling device %ld\n", PTR_ERR(cdev));
else
OpenPOWER on IntegriCloud