diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2014-11-26 19:37:50 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-11-29 17:38:38 -0500 |
commit | d3a10c14755a5929eaf43cea760bc307ee7e96bc (patch) | |
tree | a7978e3a04d8384370ee55c1aa2d0fc0cf51dc88 | |
parent | 90452e61137a3e88aa705d3efcb3874f3ce8d390 (diff) |
cpufreq-dt: pass 'policy->related_cpus' to of_cpufreq_cooling_register()
The second parameter of of_cpufreq_cooling_register() should be the CPUs to
which the frequency constraint will apply. As the cpufreq-dt driver now supports
platforms with multiple 'struct cpufreq_policy' instances (i.e. > 1 clock
domains for CPUs), passing 'cpu_present_mask' isn't correct anymore. As every
policy will have a set of CPUs and that may not be equal to 'cpu_present_mask'
always.
So, pass only mask of CPUs which are controlled by current policy.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Eduardo Valentin <edubezval@gmail.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpufreq/cpufreq-dt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index 8cba13df5f28..7374fc4b6bb3 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c | |||
@@ -274,7 +274,7 @@ static int cpufreq_init(struct cpufreq_policy *policy) | |||
274 | * thermal DT code takes care of matching them. | 274 | * thermal DT code takes care of matching them. |
275 | */ | 275 | */ |
276 | if (of_find_property(np, "#cooling-cells", NULL)) { | 276 | if (of_find_property(np, "#cooling-cells", NULL)) { |
277 | cdev = of_cpufreq_cooling_register(np, cpu_present_mask); | 277 | cdev = of_cpufreq_cooling_register(np, policy->related_cpus); |
278 | if (IS_ERR(cdev)) | 278 | if (IS_ERR(cdev)) |
279 | dev_err(cpu_dev, | 279 | dev_err(cpu_dev, |
280 | "running cpufreq without cooling device: %ld\n", | 280 | "running cpufreq without cooling device: %ld\n", |