From: Eduardo Valentin <edubezval@gmail.com>
To: Bai Ping <B51503@freescale.com>
Cc: rui.zhang@intel.com, linux-pm@vger.kernel.org
Subject: Re: [PATCH v2] thermal: imx: correct driver load sequence for cpu cooling
Date: Fri, 7 Nov 2014 14:47:58 -0400 [thread overview]
Message-ID: <20141107184749.GB23972@developer> (raw)
In-Reply-To: <1413263527-31102-1-git-send-email-B51503@freescale.com>
[-- Attachment #1: Type: text/plain, Size: 1182 bytes --]
Hello Bai,
On Tue, Oct 14, 2014 at 01:12:07PM +0800, Bai Ping wrote:
> From: Bai Ping <b51503@freescale.com>
>
> thermal driver should be regisetered after cpufreq driver has
> been registered and probed. Doing so is to make sure that thermal
> driver can get the max cpu cooling states correctly when calling
> get_property.
>
> Signed-off-by: Bai Ping <b51503@freescale.com>
> ---
> Changes for v2
> -Address the comments from Eduardo Valentin
>
Thanks for addressing the comments. Applied in my -fixes queue.
> drivers/thermal/imx_thermal.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
> index 2c516f2..8697caf 100644
> --- a/drivers/thermal/imx_thermal.c
> +++ b/drivers/thermal/imx_thermal.c
> @@ -406,6 +406,10 @@ static int imx_thermal_probe(struct platform_device *pdev)
> int measure_freq;
> int ret;
>
> + if (!cpufreq_get_current_driver()) {
> + dev_dbg(&pdev->dev, "no cpufreq driver!");
> + return -EPROBE_DEFER;
> + }
> data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
> if (!data)
> return -ENOMEM;
> --
> 1.9.1
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2014-11-07 18:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-14 5:12 [PATCH v2] thermal: imx: correct driver load sequence for cpu cooling Bai Ping
2014-11-07 18:47 ` Eduardo Valentin [this message]
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=20141107184749.GB23972@developer \
--to=edubezval@gmail.com \
--cc=B51503@freescale.com \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.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).