summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2014-11-24 15:38:01 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2014-11-25 12:08:33 +0900
commit6dbf2c990461699883d1a88406b8c270c314a2f4 (patch)
treee64860fa9af4a495875343e65b79d472293f2644
parenta4b04454ffb51969a72e078f081df899fecb24e8 (diff)
downloadlinux-3.10-6dbf2c990461699883d1a88406b8c270c314a2f4.tar.gz
linux-3.10-6dbf2c990461699883d1a88406b8c270c314a2f4.tar.bz2
linux-3.10-6dbf2c990461699883d1a88406b8c270c314a2f4.zip
cpufreq: stats: fix index of last entity in load_table
Array load_table should be pointed with last entity index instead of maximum count in array. Change-Id: I097421908cdfc875679d84900f46e907833daca3 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
-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 f8cccd34bed..217cd7d7c1c 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -313,7 +313,7 @@ static void cpufreq_stats_store_load_table(struct cpufreq_freqs *freq,
switch (val) {
case CPUFREQ_POSTCHANGE:
if (!stat->load_last_index)
- last_idx = stat->load_max_index;
+ last_idx = stat->load_max_index - 1;
else
last_idx = stat->load_last_index - 1;