Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 167a38dc authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 2bb4059e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2286,7 +2286,7 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy,
	if (cpufreq_driver->setpolicy) {
		policy->policy = new_policy->policy;
		pr_debug("setting range\n");
		return cpufreq_driver->setpolicy(new_policy);
		return cpufreq_driver->setpolicy(policy);
	}

	if (new_policy->governor == policy->governor) {