diff options
-rw-r--r-- | drivers/cpufreq/exynos-cpufreq.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index b243a7ee01f6..af2d81e10f71 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c | |||
@@ -62,8 +62,18 @@ static int exynos_target(struct cpufreq_policy *policy, | |||
62 | goto out; | 62 | goto out; |
63 | } | 63 | } |
64 | 64 | ||
65 | if (cpufreq_frequency_table_target(policy, freq_table, | 65 | /* |
66 | freqs.old, relation, &old_index)) { | 66 | * The policy max have been changed so that we cannot get proper |
67 | * old_index with cpufreq_frequency_table_target(). Thus, ignore | ||
68 | * policy and get the index from the raw freqeuncy table. | ||
69 | */ | ||
70 | for (old_index = 0; | ||
71 | freq_table[old_index].frequency != CPUFREQ_TABLE_END; | ||
72 | old_index++) | ||
73 | if (freq_table[old_index].frequency == freqs.old) | ||
74 | break; | ||
75 | |||
76 | if (freq_table[old_index].frequency == CPUFREQ_TABLE_END) { | ||
67 | ret = -EINVAL; | 77 | ret = -EINVAL; |
68 | goto out; | 78 | goto out; |
69 | } | 79 | } |