aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/pmac32-cpufreq.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-10-03 10:58:16 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-15 18:50:26 -0400
commit2633a46c581baa2a9bc33737dfbc792745e30554 (patch)
treedbc988e65dce8b8effba80f8264f7c35fa48f5e3 /drivers/cpufreq/pmac32-cpufreq.c
parent571743107dff548ca9dd24d6e6ec2dac2f5424a1 (diff)
cpufreq: pmac: 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 pmac driver. 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/pmac32-cpufreq.c')
-rw-r--r--drivers/cpufreq/pmac32-cpufreq.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
index 470b5553bb66..8715ab99d80e 100644
--- a/drivers/cpufreq/pmac32-cpufreq.c
+++ b/drivers/cpufreq/pmac32-cpufreq.c
@@ -86,11 +86,6 @@ static struct cpufreq_frequency_table pmac_cpu_freqs[] = {
86 {0, CPUFREQ_TABLE_END}, 86 {0, CPUFREQ_TABLE_END},
87}; 87};
88 88
89static struct freq_attr* pmac_cpu_freqs_attr[] = {
90 &cpufreq_freq_attr_scaling_available_freqs,
91 NULL,
92};
93
94static inline void local_delay(unsigned long ms) 89static inline void local_delay(unsigned long ms)
95{ 90{
96 if (no_schedule) 91 if (no_schedule)
@@ -378,11 +373,6 @@ static unsigned int pmac_cpufreq_get_speed(unsigned int cpu)
378 return cur_freq; 373 return cur_freq;
379} 374}
380 375
381static int pmac_cpufreq_verify(struct cpufreq_policy *policy)
382{
383 return cpufreq_frequency_table_verify(policy, pmac_cpu_freqs);
384}
385
386static int pmac_cpufreq_target( struct cpufreq_policy *policy, 376static int pmac_cpufreq_target( struct cpufreq_policy *policy,
387 unsigned int target_freq, 377 unsigned int target_freq,
388 unsigned int relation) 378 unsigned int relation)
@@ -468,14 +458,14 @@ static int pmac_cpufreq_resume(struct cpufreq_policy *policy)
468} 458}
469 459
470static struct cpufreq_driver pmac_cpufreq_driver = { 460static struct cpufreq_driver pmac_cpufreq_driver = {
471 .verify = pmac_cpufreq_verify, 461 .verify = cpufreq_generic_frequency_table_verify,
472 .target = pmac_cpufreq_target, 462 .target = pmac_cpufreq_target,
473 .get = pmac_cpufreq_get_speed, 463 .get = pmac_cpufreq_get_speed,
474 .init = pmac_cpufreq_cpu_init, 464 .init = pmac_cpufreq_cpu_init,
475 .suspend = pmac_cpufreq_suspend, 465 .suspend = pmac_cpufreq_suspend,
476 .resume = pmac_cpufreq_resume, 466 .resume = pmac_cpufreq_resume,
477 .flags = CPUFREQ_PM_NO_WARN, 467 .flags = CPUFREQ_PM_NO_WARN,
478 .attr = pmac_cpu_freqs_attr, 468 .attr = cpufreq_generic_attr,
479 .name = "powermac", 469 .name = "powermac",
480}; 470};
481 471