From: Mike Chan Date: Thu, 4 Dec 2008 20:19:17 +0000 (-0800) Subject: [CPUFREQ] Fix on resume, now preserves user policy min/max. X-Git-Tag: firefly_0821_release~16404^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=187d9f4ed4fc089f1f25a875fb485e27626972f9;p=firefly-linux-kernel-4.4.55.git [CPUFREQ] Fix on resume, now preserves user policy min/max. Previously driver resume would always set the current policy min/max with the cpuinfo min/max, defined by user_policy.min/max. Resulting in a reset of policy settings when policy.min/max != cpuinfo.min/max when coming out of suspend. Now user_policy is saved as the policy instead of cpuinfo to preserve what the user actually set. Signed-off-by: Mike Chan Signed-off-by: Dave Jones --- diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 9044b911d8ae..01dde80597f7 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -827,8 +827,8 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) dprintk("initialization failed\n"); goto err_out; } - policy->user_policy.min = policy->cpuinfo.min_freq; - policy->user_policy.max = policy->cpuinfo.max_freq; + policy->user_policy.min = policy->min; + policy->user_policy.max = policy->max; blocking_notifier_call_chain(&cpufreq_policy_notifier_list, CPUFREQ_START, policy);