linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jia Hongtao <hongtao.jia@nxp.com>
To: <viresh.kumar@linaro.org>, <linux-pm@vger.kernel.org>
Cc: <linuxppc-dev@lists.ozlabs.org>, <scott.wood@nxp.com>,
	<yuantian.tang@nxp.com>, <hongtao.jia@nxp.com>
Subject: [PATCH 2/2] cpufreq: qoriq: Don't show cooling device messages if THERMAL_OF undefined
Date: Mon, 18 Apr 2016 15:59:32 +0800	[thread overview]
Message-ID: <1460966372-4877-2-git-send-email-hongtao.jia@nxp.com> (raw)
In-Reply-To: <1460966372-4877-1-git-send-email-hongtao.jia@nxp.com>

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>
---
 drivers/cpufreq/qoriq-cpufreq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c
index 1c2fdc1..ff8da83 100644
--- a/drivers/cpufreq/qoriq-cpufreq.c
+++ b/drivers/cpufreq/qoriq-cpufreq.c
@@ -340,8 +340,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;
-- 
2.1.0.27.g96db324

  reply	other threads:[~2016-04-18  8:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-18  7:59 [PATCH 1/2] cpufreq: qoriq: Fix cooling device registration issue during suspend Jia Hongtao
2016-04-18  7:59 ` Jia Hongtao [this message]
2016-04-18 10:33   ` [PATCH 2/2] cpufreq: qoriq: Don't show cooling device messages if THERMAL_OF undefined Viresh Kumar
2016-04-26  0:02     ` Rafael J. Wysocki
2016-04-18 10:32 ` [PATCH 1/2] cpufreq: qoriq: Fix cooling device registration issue during suspend Viresh Kumar
2016-04-19  6:52   ` 答复: " Hongtao Jia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460966372-4877-2-git-send-email-hongtao.jia@nxp.com \
    --to=hongtao.jia@nxp.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=scott.wood@nxp.com \
    --cc=viresh.kumar@linaro.org \
    --cc=yuantian.tang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).