diff options
| author | mattis fjallstrom <mattis@acm.org> | 2015-05-21 12:00:33 -0700 | 
|---|---|---|
| committer | mattis fjallstrom <mattis@acm.org> | 2015-05-21 13:24:30 -0700 | 
| commit | 7d990a059acf5eb46ae99c058fc9911cbdce131d (patch) | |
| tree | ac9531b3ff2b2670dabc84c248a1770c84109586 /drivers/cpufreq/cpufreq-cpu0.c | |
| parent | e8980e2a6a7392ae5a1f882d1ba01e03ac83f899 (diff) | |
| parent | 89fdc2c4bb83fff36199cd883a27efb317f02037 (diff) | |
| download | olio-linux-3.10-7d990a059acf5eb46ae99c058fc9911cbdce131d.tar.xz olio-linux-3.10-7d990a059acf5eb46ae99c058fc9911cbdce131d.zip  | |
Merge branch 'android-omap-minnow-3.10-lollipop-wear-release' of https://android.googlesource.com/kernel/omap into mattis_devmattis_dev
Change-Id: I46165dd7747b9b6289eb44cb96cbef2de46c10ba
Diffstat (limited to 'drivers/cpufreq/cpufreq-cpu0.c')
| -rw-r--r-- | drivers/cpufreq/cpufreq-cpu0.c | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c index dd7bc175ca8..0b9f6a3c66c 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c @@ -150,15 +150,22 @@ out:  static int cpu0_cpufreq_pm_notify(struct notifier_block *nb,  	unsigned long event, void *dummy)  { +	static unsigned int old_policy_max;  	mutex_lock(&cpu0_cpufreq_lock);  	if (event == PM_SUSPEND_PREPARE) {  		struct cpufreq_policy *policy = cpufreq_cpu_get(0);  		is_suspended = true; +		old_policy_max = policy->max; +		policy->max = policy->cpuinfo.max_freq;  		pr_debug("cpu0 cpufreq suspend: setting frequency to %d kHz\n",  			policy->max);  		__cpu0_set_target(policy, policy->max, CPUFREQ_RELATION_L);  		cpufreq_cpu_put(policy);  	} else if (event == PM_POST_SUSPEND) { +		struct cpufreq_policy *policy = cpufreq_cpu_get(0); +		policy->max = old_policy_max; +		__cpu0_set_target(policy, policy->max, CPUFREQ_RELATION_L); +		cpufreq_cpu_put(policy);  		is_suspended = false;  	}  	mutex_unlock(&cpu0_cpufreq_lock); @@ -182,6 +189,7 @@ static int cpu0_cpufreq_reboot_notify(struct notifier_block *nb,  		mutex_lock(&cpu0_cpufreq_lock);  		policy = cpufreq_cpu_get(0);  		is_suspended = true; +		policy->max = policy->cpuinfo.max_freq;  		pr_info("cpu0 cpufreq shutdown: setting frequency to %d kHz\n",  				policy->max);  		__cpu0_set_target(policy, policy->max, CPUFREQ_RELATION_L);  |