From d958fbe8b343dac82ee21662de4b98d71aeec7db Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=99=88=E4=BA=AE?= Date: Tue, 22 Apr 2014 00:57:02 -0700 Subject: [PATCH] cpufreq: ensure DISABLE_FURTHER_CPUFREQ effective when reboot or resume --- drivers/cpufreq/rockchip-cpufreq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/cpufreq/rockchip-cpufreq.c b/drivers/cpufreq/rockchip-cpufreq.c index 55a69105704c..22a7baedd8a5 100644 --- a/drivers/cpufreq/rockchip-cpufreq.c +++ b/drivers/cpufreq/rockchip-cpufreq.c @@ -356,6 +356,7 @@ static int cpufreq_pm_notifier_event(struct notifier_block *this, unsigned long switch (event) { case PM_SUSPEND_PREPARE: + policy->cur++; ret = cpufreq_driver_target(policy, suspend_freq, DISABLE_FURTHER_CPUFREQ | CPUFREQ_RELATION_H); if (ret < 0) { ret = NOTIFY_BAD; @@ -388,6 +389,7 @@ static int cpufreq_reboot_notifier_event(struct notifier_block *this, unsigned l if (policy) { is_booting = false; + policy->cur++; cpufreq_driver_target(policy, suspend_freq, DISABLE_FURTHER_CPUFREQ | CPUFREQ_RELATION_H); cpufreq_cpu_put(policy); } -- 2.34.1