From: 陈亮 Date: Tue, 22 Apr 2014 07:57:02 +0000 (-0700) Subject: cpufreq: ensure DISABLE_FURTHER_CPUFREQ effective when reboot or resume X-Git-Tag: firefly_0821_release~5471 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d958fbe8b343dac82ee21662de4b98d71aeec7db;p=firefly-linux-kernel-4.4.55.git cpufreq: ensure DISABLE_FURTHER_CPUFREQ effective when reboot or resume --- 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); }