thermal: imx: Calling imx_thermal_unregister_legacy_cooling() in .remove
Subsystems (2)
PATCH 1/1 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]>
--- drivers/thermal/imx_thermal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/thermal/imx_thermal.c +1 -2
@@ -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 ; }
Signature · 1 line
2.7.4
Daniel Lezcano
AppliedQuoted 7 lines · Anson Huang
imx_thermal_unregister_legacy_cooling()should be used for handling legacy cpufreq cooling cleanups in .remove callback instead of callingcpufreq_cooling_unregister()andcpufreq_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]>
Applied, thanks
Quoted 19 lines
--- drivers/thermal/imx_thermal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/thermal/imx_thermal.c +1
-2@@ -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 ; }
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog