diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2020-03-13 16:28:14 +0800 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2020-03-20 12:17:48 +0100 |
commit | 9db11010f27b9e96417a3a4d0b61115eed7fbb48 (patch) | |
tree | 90ff056819e9e76ffc1699896983919247e129b8 /drivers/thermal | |
parent | ce68eeca8f26c9691513d8f94ceaca0040585f52 (diff) | |
download | linux-9db11010f27b9e96417a3a4d0b61115eed7fbb48.tar.gz |
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 <Anson.Huang@nxp.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/1584088094-24857-1-git-send-email-Anson.Huang@nxp.com
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/imx_thermal.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index d2fa301e5033..e761c9b42217 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -865,8 +865,7 @@ static int imx_thermal_remove(struct platform_device *pdev) clk_disable_unprepare(data->thermal_clk); thermal_zone_device_unregister(data->tz); - cpufreq_cooling_unregister(data->cdev); - cpufreq_cpu_put(data->policy); + imx_thermal_unregister_legacy_cooling(data); return 0; } |