CHROMIUM: cpufreq: cpu_thermal only allows lower max frequency, fix it
authorSonny Rao <sonnyrao@chromium.org>
Fri, 14 Dec 2012 22:48:30 +0000 (14:48 -0800)
committerGerrit <chrome-bot@google.com>
Tue, 18 Dec 2012 03:01:02 +0000 (19:01 -0800)
commit62182b261b206d58f447330a3d1803f5322c5a43
treeb419181417f57701a576f185cff3b496bfee811b
parent72fbc555cdf13359b854f4f53fd4384920e71ba0
CHROMIUM: cpufreq: cpu_thermal only allows lower max frequency, fix it

The cpu_thermal generic thermal management code has a bug where once
max cpu frequency has been lowered in sysfs (scaling_max_freq) it is
not possible to raise the max back up later.  The bug is that the
notifer gets called by __cpufreq_set_policy() before the user policy
max is raised, and is incorrectly trying to enforce the max frequency
policy even when we are trying to change the policy.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
BUG=chromium-os:36435
TEST=kernel_CpufreqMinMax

Change-Id: I12ad4ef5aad544333cad4a9ff1e81f04d1cfa5e8
Reviewed-on: https://gerrit.chromium.org/gerrit/39793
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
drivers/thermal/cpu_cooling.c