diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-09-16 09:26:28 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-30 14:18:43 -0400 |
commit | 6b4147db3de33b49a5c6a88736e9322936672dc4 (patch) | |
tree | 38506f1a4ac66e4edf9e96dc3da591494b0bd0b1 /drivers/cpufreq | |
parent | b147405aa8e568750bfa99501c7fa831edef47c9 (diff) |
cpufreq: ppc: use cpufreq_table_validate_and_show()
Lets use cpufreq_table_validate_and_show() instead of calling
cpufreq_frequency_table_cpuinfo() and cpufreq_frequency_table_get_attr().
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/ppc-corenet-cpufreq.c | 3 | ||||
-rw-r--r-- | drivers/cpufreq/ppc_cbe_cpufreq.c | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c b/drivers/cpufreq/ppc-corenet-cpufreq.c index 60e81d524ea8..5716b44ffc0d 100644 --- a/drivers/cpufreq/ppc-corenet-cpufreq.c +++ b/drivers/cpufreq/ppc-corenet-cpufreq.c | |||
@@ -202,7 +202,7 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
202 | table[i].frequency = CPUFREQ_TABLE_END; | 202 | table[i].frequency = CPUFREQ_TABLE_END; |
203 | 203 | ||
204 | /* set the min and max frequency properly */ | 204 | /* set the min and max frequency properly */ |
205 | ret = cpufreq_frequency_table_cpuinfo(policy, table); | 205 | ret = cpufreq_table_validate_and_show(policy, table); |
206 | if (ret) { | 206 | if (ret) { |
207 | pr_err("invalid frequency table: %d\n", ret); | 207 | pr_err("invalid frequency table: %d\n", ret); |
208 | goto err_nomem1; | 208 | goto err_nomem1; |
@@ -219,7 +219,6 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
219 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | 219 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; |
220 | policy->cur = corenet_cpufreq_get_speed(policy->cpu); | 220 | policy->cur = corenet_cpufreq_get_speed(policy->cpu); |
221 | 221 | ||
222 | cpufreq_frequency_table_get_attr(table, cpu); | ||
223 | of_node_put(np); | 222 | of_node_put(np); |
224 | 223 | ||
225 | return 0; | 224 | return 0; |
diff --git a/drivers/cpufreq/ppc_cbe_cpufreq.c b/drivers/cpufreq/ppc_cbe_cpufreq.c index 2e448f0bbdc5..6c5be63ce918 100644 --- a/drivers/cpufreq/ppc_cbe_cpufreq.c +++ b/drivers/cpufreq/ppc_cbe_cpufreq.c | |||
@@ -123,11 +123,9 @@ static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
123 | cpumask_copy(policy->cpus, cpu_sibling_mask(policy->cpu)); | 123 | cpumask_copy(policy->cpus, cpu_sibling_mask(policy->cpu)); |
124 | #endif | 124 | #endif |
125 | 125 | ||
126 | cpufreq_frequency_table_get_attr(cbe_freqs, policy->cpu); | ||
127 | |||
128 | /* this ensures that policy->cpuinfo_min | 126 | /* this ensures that policy->cpuinfo_min |
129 | * and policy->cpuinfo_max are set correctly */ | 127 | * and policy->cpuinfo_max are set correctly */ |
130 | return cpufreq_frequency_table_cpuinfo(policy, cbe_freqs); | 128 | return cpufreq_table_validate_and_show(policy, cbe_freqs); |
131 | } | 129 | } |
132 | 130 | ||
133 | static int cbe_cpufreq_cpu_exit(struct cpufreq_policy *policy) | 131 | static int cbe_cpufreq_cpu_exit(struct cpufreq_policy *policy) |