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:Junjie Wu <junjiew@codeaurora.org>
Loading
Please register or sign in to comment