diff options
author | Jia Hongtao <hongtao.jia@nxp.com> | 2016-04-18 15:59:32 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-04-25 16:00:42 +0200 |
commit | 27b8fe8daf39c8a028d377a878b1405b73f5a10f (patch) | |
tree | 32ebf73e29e5f97b24fc47fe350d673acee8345f | |
parent | a29a1e76781d112014761ba106ab03e097cc4492 (diff) | |
download | linux-27b8fe8daf39c8a028d377a878b1405b73f5a10f.tar.gz linux-27b8fe8daf39c8a028d377a878b1405b73f5a10f.tar.bz2 linux-27b8fe8daf39c8a028d377a878b1405b73f5a10f.zip |
cpufreq: qoriq: Don't show cooling device messages if THERMAL_OF undefined
When THERMAL_OF is undefined the cooling device messages should not be
shown. -ENOSYS is returned from of_cpufreq_cooling_register() when
THERMAL_OF is undefined.
Signed-off-by: Jia Hongtao <hongtao.jia@nxp.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpufreq/qoriq-cpufreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c index b23e525a7af3..8b7758936fcf 100644 --- a/drivers/cpufreq/qoriq-cpufreq.c +++ b/drivers/cpufreq/qoriq-cpufreq.c @@ -333,8 +333,8 @@ static void qoriq_cpufreq_ready(struct cpufreq_policy *policy) cpud->cdev = of_cpufreq_cooling_register(np, policy->related_cpus); - if (IS_ERR(cpud->cdev)) { - pr_err("Failed to register cooling device cpu%d: %ld\n", + if (IS_ERR(cpud->cdev) && PTR_ERR(cpud->cdev) != -ENOSYS) { + pr_err("cpu%d is not running as cooling device: %ld\n", policy->cpu, PTR_ERR(cpud->cdev)); cpud->cdev = NULL; |