diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-10-03 10:58:26 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-15 18:50:27 -0400 |
commit | 7a1874a0645b7cefd80c379db6d78916dd0788a1 (patch) | |
tree | 670b210fdfc60d673ab5254d57af074433cae8f6 /drivers/cpufreq | |
parent | a8f64decf383aaf16fd4698f753d3a4c26fbba7d (diff) |
cpufreq: sparc: Use generic cpufreq routines
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines in the sparc driver.
Cc: David S. Miller <davem@davemloft.net>
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/sparc-us2e-cpufreq.c | 8 | ||||
-rw-r--r-- | drivers/cpufreq/sparc-us3-cpufreq.c | 8 |
2 files changed, 2 insertions, 14 deletions
diff --git a/drivers/cpufreq/sparc-us2e-cpufreq.c b/drivers/cpufreq/sparc-us2e-cpufreq.c index 8db0c1890c92..291688c1da9a 100644 --- a/drivers/cpufreq/sparc-us2e-cpufreq.c +++ b/drivers/cpufreq/sparc-us2e-cpufreq.c | |||
@@ -295,12 +295,6 @@ static int us2e_freq_target(struct cpufreq_policy *policy, | |||
295 | return 0; | 295 | return 0; |
296 | } | 296 | } |
297 | 297 | ||
298 | static int us2e_freq_verify(struct cpufreq_policy *policy) | ||
299 | { | ||
300 | return cpufreq_frequency_table_verify(policy, | ||
301 | &us2e_freq_table[policy->cpu].table[0]); | ||
302 | } | ||
303 | |||
304 | static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy) | 298 | static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy) |
305 | { | 299 | { |
306 | unsigned int cpu = policy->cpu; | 300 | unsigned int cpu = policy->cpu; |
@@ -363,7 +357,7 @@ static int __init us2e_freq_init(void) | |||
363 | goto err_out; | 357 | goto err_out; |
364 | 358 | ||
365 | driver->init = us2e_freq_cpu_init; | 359 | driver->init = us2e_freq_cpu_init; |
366 | driver->verify = us2e_freq_verify; | 360 | driver->verify = cpufreq_generic_frequency_table_verify; |
367 | driver->target = us2e_freq_target; | 361 | driver->target = us2e_freq_target; |
368 | driver->get = us2e_freq_get; | 362 | driver->get = us2e_freq_get; |
369 | driver->exit = us2e_freq_cpu_exit; | 363 | driver->exit = us2e_freq_cpu_exit; |
diff --git a/drivers/cpufreq/sparc-us3-cpufreq.c b/drivers/cpufreq/sparc-us3-cpufreq.c index 120a2df2bc70..9b3dbd31362e 100644 --- a/drivers/cpufreq/sparc-us3-cpufreq.c +++ b/drivers/cpufreq/sparc-us3-cpufreq.c | |||
@@ -156,12 +156,6 @@ static int us3_freq_target(struct cpufreq_policy *policy, | |||
156 | return 0; | 156 | return 0; |
157 | } | 157 | } |
158 | 158 | ||
159 | static int us3_freq_verify(struct cpufreq_policy *policy) | ||
160 | { | ||
161 | return cpufreq_frequency_table_verify(policy, | ||
162 | &us3_freq_table[policy->cpu].table[0]); | ||
163 | } | ||
164 | |||
165 | static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) | 159 | static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) |
166 | { | 160 | { |
167 | unsigned int cpu = policy->cpu; | 161 | unsigned int cpu = policy->cpu; |
@@ -224,7 +218,7 @@ static int __init us3_freq_init(void) | |||
224 | goto err_out; | 218 | goto err_out; |
225 | 219 | ||
226 | driver->init = us3_freq_cpu_init; | 220 | driver->init = us3_freq_cpu_init; |
227 | driver->verify = us3_freq_verify; | 221 | driver->verify = cpufreq_generic_frequency_table_verify; |
228 | driver->target = us3_freq_target; | 222 | driver->target = us3_freq_target; |
229 | driver->get = us3_freq_get; | 223 | driver->get = us3_freq_get; |
230 | driver->exit = us3_freq_cpu_exit; | 224 | driver->exit = us3_freq_cpu_exit; |