Commit 491b079d authored by Bai Ping's avatar Bai Ping Committed by Eduardo Valentin

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: default avatarBai Ping <b51503@freescale.com>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent 225112a5
...@@ -459,6 +459,10 @@ static int imx_thermal_probe(struct platform_device *pdev) ...@@ -459,6 +459,10 @@ static int imx_thermal_probe(struct platform_device *pdev)
int measure_freq; int measure_freq;
int ret; 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); data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
if (!data) if (!data)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment