Message ID | 1460966372-4877-2-git-send-email-hongtao.jia@nxp.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Rafael Wysocki |
Headers | show |
On 18-04-16, 15:59, Jia Hongtao wrote: > 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; Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
On Monday, April 18, 2016 04:03:45 PM Viresh Kumar wrote: > On 18-04-16, 15:59, Jia Hongtao wrote: > > 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; > > Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Applied, thanks! -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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;
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(-)