diff options
-rw-r--r-- | drivers/cpufreq/powernv-cpufreq.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index e1e519703dfe..9edccc63245d 100644 --- a/drivers/cpufreq/powernv-cpufreq.c +++ b/drivers/cpufreq/powernv-cpufreq.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #define POWERNV_MAX_PSTATES 256 | 33 | #define POWERNV_MAX_PSTATES 256 |
34 | 34 | ||
35 | static struct cpufreq_frequency_table powernv_freqs[POWERNV_MAX_PSTATES+1]; | 35 | static struct cpufreq_frequency_table powernv_freqs[POWERNV_MAX_PSTATES+1]; |
36 | static int powernv_pstate_ids[POWERNV_MAX_PSTATES+1]; | ||
37 | 36 | ||
38 | /* | 37 | /* |
39 | * Note: The set of pstates consists of contiguous integers, the | 38 | * Note: The set of pstates consists of contiguous integers, the |
@@ -112,7 +111,7 @@ static int init_powernv_pstates(void) | |||
112 | 111 | ||
113 | pr_debug("PState id %d freq %d MHz\n", id, freq); | 112 | pr_debug("PState id %d freq %d MHz\n", id, freq); |
114 | powernv_freqs[i].frequency = freq * 1000; /* kHz */ | 113 | powernv_freqs[i].frequency = freq * 1000; /* kHz */ |
115 | powernv_pstate_ids[i] = id; | 114 | powernv_freqs[i].driver_data = id; |
116 | } | 115 | } |
117 | /* End of list marker entry */ | 116 | /* End of list marker entry */ |
118 | powernv_freqs[i].frequency = CPUFREQ_TABLE_END; | 117 | powernv_freqs[i].frequency = CPUFREQ_TABLE_END; |
@@ -283,7 +282,7 @@ static int powernv_cpufreq_target_index(struct cpufreq_policy *policy, | |||
283 | { | 282 | { |
284 | struct powernv_smp_call_data freq_data; | 283 | struct powernv_smp_call_data freq_data; |
285 | 284 | ||
286 | freq_data.pstate_id = powernv_pstate_ids[new_index]; | 285 | freq_data.pstate_id = powernv_freqs[new_index].driver_data; |
287 | 286 | ||
288 | /* | 287 | /* |
289 | * Use smp_call_function to send IPI and execute the | 288 | * Use smp_call_function to send IPI and execute the |