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

Commit 98aa9f47 authored by Junjie Wu's avatar Junjie Wu
Browse files

cpufreq: Fix restore of policy min/max for hotplug



Commit fdfdc36e
("cpufreq: Save and restore user min/max freq for hotplug") only
partially achieved what it intended due to wrong placement of policy
restore code.

While policy->user_policy.min/max are restored correctly, new_policy
min/max have copied initial policy->min/max instead of
restored ones. cpufreq_set_policy() overwrites restored policy->min/max
after setting the frequency, resulting in a policy->min/max range that
potentially violates the one specified by policy->user_policy. The
error will persist until next time cpufreq_update_policy() is called.

Fix by moving policy min/max restore before copying current policy to
new_policy.

Change-Id: Ib97500d26fcd98dc23d26456c699abfeaa9a9c07
Signed-off-by: default avatarJunjie Wu <junjiew@codeaurora.org>
parent fa3dfef9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment