From f62304cb9808ea628f41f5a45829ba737c841d4c Mon Sep 17 00:00:00 2001 From: Bai Ping Date: Tue, 12 Jan 2016 16:27:46 +0800 Subject: 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 --- drivers/thermal/imx_thermal.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/thermal/imx_thermal.c') 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]); -- cgit v1.2.3