Skip to content

Commit 9db1101

Browse files
Anson-Huangdlezcano
authored andcommitted
thermal: imx: Calling imx_thermal_unregister_legacy_cooling() in .remove
imx_thermal_unregister_legacy_cooling() should be used for handling legacy cpufreq cooling cleanups in .remove callback instead of calling cpufreq_cooling_unregister() and cpufreq_cpu_put() directly, especially for !CONFIG_CPU_FREQ scenario, no operation needed for handling legacy cpufreq cooling cleanups at all. Signed-off-by: Anson Huang <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent ce68eec commit 9db1101

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/thermal/imx_thermal.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,7 @@ static int imx_thermal_remove(struct platform_device *pdev)
865865
clk_disable_unprepare(data->thermal_clk);
866866

867867
thermal_zone_device_unregister(data->tz);
868-
cpufreq_cooling_unregister(data->cdev);
869-
cpufreq_cpu_put(data->policy);
868+
imx_thermal_unregister_legacy_cooling(data);
870869

871870
return 0;
872871
}

0 commit comments

Comments
 (0)