aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/imx_thermal.c
diff options
context:
space:
mode:
authorBai Ping <b51503@freescale.com>2014-10-14 01:12:07 -0400
committerEduardo Valentin <edubezval@gmail.com>2014-11-07 13:44:41 -0500
commit491b079db3f7fa631f6a012e7e896a1eafe4dd99 (patch)
tree924c4146e1bcca2851e40d659f0abf5dd889b457 /drivers/thermal/imx_thermal.c
parent225112a56942c74f1e114587719fa2bd0d180b3e (diff)
thermal: imx: correct driver load sequence for cpu cooling
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> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/imx_thermal.c')
-rw-r--r--drivers/thermal/imx_thermal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index 461bf3d033a0..0e35999ad8b2 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -459,6 +459,10 @@ static int imx_thermal_probe(struct platform_device *pdev)
459 int measure_freq; 459 int measure_freq;
460 int ret; 460 int ret;
461 461
462 if (!cpufreq_get_current_driver()) {
463 dev_dbg(&pdev->dev, "no cpufreq driver!");
464 return -EPROBE_DEFER;
465 }
462 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); 466 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
463 if (!data) 467 if (!data)
464 return -ENOMEM; 468 return -ENOMEM;