aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_stats.c
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2008-04-27 16:46:56 -0400
committerDave Jones <davej@redhat.com>2008-04-28 16:27:08 -0400
commit6501faf8c1bbaa51dc493f3681df016d2ebce833 (patch)
treef83148776a4abc3c27da39bef24a2eabb056a2de /drivers/cpufreq/cpufreq_stats.c
parent30d221db4439973076953e2ed44344fa92d1d09f (diff)
[CPUFREQ] state info wrong after resume
Sometimes old_index != stat->last_index, see cpufreq_update_policy, bios can change cpu setting in resume. In my test, after resume cpu is in lowest speed, but the stat info shows cpu is in full speed. This patch makes the stat info correct after a resume. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq_stats.c')
-rw-r--r--drivers/cpufreq/cpufreq_stats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index ef09e069433b..ae70d63a8b26 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -288,7 +288,7 @@ cpufreq_stat_notifier_trans (struct notifier_block *nb, unsigned long val,
288 if (!stat) 288 if (!stat)
289 return 0; 289 return 0;
290 290
291 old_index = freq_table_get_index(stat, freq->old); 291 old_index = stat->last_index;
292 new_index = freq_table_get_index(stat, freq->new); 292 new_index = freq_table_get_index(stat, freq->new);
293 293
294 cpufreq_stats_update(freq->cpu); 294 cpufreq_stats_update(freq->cpu);