Skip to content

Commit

Permalink
cpufreq: qoriq: Don't show cooling device messages if THERMAL_OF unde…
Browse files Browse the repository at this point in the history
…fined

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 <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
jhttroy authored and rafaeljw committed Apr 25, 2016
1 parent a29a1e7 commit 27b8fe8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/cpufreq/qoriq-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 27b8fe8

Please sign in to comment.