MLK-12328 cpufreq: imx: put the cpufreq policy after used
authorBai Ping <ping.bai@nxp.com>
Wed, 27 Jan 2016 07:43:39 +0000 (15:43 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:57 +0000 (14:49 -0500)
The cpufreq_cpu_get() and cpufreq_cpu_put() should be called in
pairs. Otherwise, system will dump when enabling lock debug config.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
drivers/cpufreq/imx6q-cpufreq.c
drivers/cpufreq/imx7-cpufreq.c

index 04b9662..ad6b03c 100644 (file)
@@ -251,6 +251,7 @@ static int imx6_cpufreq_pm_notify(struct notifier_block *nb,
        }
 
        cpufreq_update_policy(0);
+       cpufreq_cpu_put(data);
 
        return NOTIFY_OK;
 }
index d5c799a..b13126d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Freescale Semiconductor, Inc.
+ * Copyright (C) 2015-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
@@ -151,6 +151,7 @@ static int imx7_cpufreq_pm_notify(struct notifier_block *nb,
        }
 
        cpufreq_update_policy(0);
+       cpufreq_cpu_put(data);
 
        return NOTIFY_OK;
 }