diff options
author | Bai Ping <ping.bai@nxp.com> | 2016-01-12 16:27:46 +0800 |
---|---|---|
committer | Octavian Purdila <octavian.purdila@nxp.com> | 2017-02-23 14:21:42 +0200 |
commit | f62304cb9808ea628f41f5a45829ba737c841d4c (patch) | |
tree | 8721bf5edd005eb68f91daf1dc113e029bd3385b /drivers/thermal/imx_thermal.c | |
parent | e984e9bea0ee6bacf0bc04146db9a5318ef09f5d (diff) |
MLK-12219 thermal: imx: unregister busfreq_notifier in thermal_remove
unregister the busfreq_notifier when the thermal driver is removed.
Signed-off-by: Bai Ping <ping.bai@nxp.com>
Diffstat (limited to 'drivers/thermal/imx_thermal.c')
-rw-r--r-- | drivers/thermal/imx_thermal.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index a4fb898ef0b1..4896244d9f5d 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -1,5 +1,5 @@ /* - * Copyright 2013-2015 Freescale Semiconductor, Inc. + * Copyright 2013-2016 Freescale Semiconductor, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -919,6 +919,10 @@ static int imx_thermal_remove(struct platform_device *pdev) if (!IS_ERR(data->thermal_clk)) clk_disable_unprepare(data->thermal_clk); + /* unregister the busfreq notifier called in low bus freq */ + if (data->socdata->version != TEMPMON_IMX7) + unregister_busfreq_notifier(&thermal_notifier); + thermal_zone_device_unregister(data->tz); cpufreq_cooling_unregister(data->cdev[0]); devfreq_cooling_unregister(data->cdev[1]); |