* [PATCH v2] thermal: imx: correct driver load sequence for cpu cooling
@ 2014-10-14 5:12 Bai Ping
2014-11-07 18:47 ` Eduardo Valentin
0 siblings, 1 reply; 2+ messages in thread
From: Bai Ping @ 2014-10-14 5:12 UTC (permalink / raw)
To: rui.zhang, edubezval; +Cc: linux-pm
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
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] thermal: imx: correct driver load sequence for cpu cooling
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
0 siblings, 0 replies; 2+ messages in thread
From: Eduardo Valentin @ 2014-11-07 18:47 UTC (permalink / raw)
To: Bai Ping; +Cc: rui.zhang, linux-pm
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-07 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).