diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-02-19 18:26:30 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-02-20 04:18:37 -0500 |
commit | 167a38dcd5caaa85994ac8b7d2d1c20a71cd947b (patch) | |
tree | 5bd9632a284dddf1af7e715e3dc4a6f66d0a3bf5 /drivers/cpufreq/cpufreq.c | |
parent | 2bb4059e075dcb8d5a2f8689bb661aa76c487ab0 (diff) |
cpufreq: Pass updated policy to driver ->setpolicy() callback
The invocation of the ->setpolicy() cpufreq driver callback should
be equivalent to calling cpufreq_governor_limits(policy) for drivers
with internal governors, but in fact it isn't so, because the
temporary new_policy object is passed to it instead of the updated
policy.
That is a bit confusing, so make cpufreq_set_policy() pass the
updated policy to the driver ->setpolicy() callback.
No intentional changes of behavior.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 06b1a954d6e4..0e626b00053b 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -2286,7 +2286,7 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy, | |||
2286 | if (cpufreq_driver->setpolicy) { | 2286 | if (cpufreq_driver->setpolicy) { |
2287 | policy->policy = new_policy->policy; | 2287 | policy->policy = new_policy->policy; |
2288 | pr_debug("setting range\n"); | 2288 | pr_debug("setting range\n"); |
2289 | return cpufreq_driver->setpolicy(new_policy); | 2289 | return cpufreq_driver->setpolicy(policy); |
2290 | } | 2290 | } |
2291 | 2291 | ||
2292 | if (new_policy->governor == policy->governor) { | 2292 | if (new_policy->governor == policy->governor) { |