diff --git a/drivers/thermal/msm_thermal.c b/drivers/thermal/msm_thermal.c index c6ba24e56a7..e0d8d145ec6 100644 --- a/drivers/thermal/msm_thermal.c +++ b/drivers/thermal/msm_thermal.c @@ -117,6 +117,10 @@ static void disable_msm_thermal(void) int cpu = 0; struct cpufreq_policy *cpu_policy = NULL; + /* make sure check_temp is no longer running */ + cancel_delayed_work(&check_temp_work); + flush_scheduled_work(); + for_each_possible_cpu(cpu) { cpu_policy = cpufreq_cpu_get(cpu); if (cpu_policy) {