Commit 27b8fe8d authored by Jia Hongtao's avatar Jia Hongtao Committed by Rafael J. Wysocki

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: default avatarJia Hongtao <hongtao.jia@nxp.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent a29a1e76
...@@ -333,8 +333,8 @@ static void qoriq_cpufreq_ready(struct cpufreq_policy *policy) ...@@ -333,8 +333,8 @@ static void qoriq_cpufreq_ready(struct cpufreq_policy *policy)
cpud->cdev = of_cpufreq_cooling_register(np, cpud->cdev = of_cpufreq_cooling_register(np,
policy->related_cpus); policy->related_cpus);
if (IS_ERR(cpud->cdev)) { if (IS_ERR(cpud->cdev) && PTR_ERR(cpud->cdev) != -ENOSYS) {
pr_err("Failed to register cooling device cpu%d: %ld\n", pr_err("cpu%d is not running as cooling device: %ld\n",
policy->cpu, PTR_ERR(cpud->cdev)); policy->cpu, PTR_ERR(cpud->cdev));
cpud->cdev = NULL; cpud->cdev = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment