summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/pxa3xx-cpufreq.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-10-03 16:58:20 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-16 00:50:27 +0200
commitbf36e48d737ebcb2282f51c08e9c7667e30ed3b6 (patch)
tree99b08a7669f4280a8b2926a826368dd7d8e61e6e /drivers/cpufreq/pxa3xx-cpufreq.c
parentcpufreq: ppc_cbe: Use generic cpufreq routines (diff)
downloadlinux-bf36e48d737ebcb2282f51c08e9c7667e30ed3b6.tar.xz
linux-bf36e48d737ebcb2282f51c08e9c7667e30ed3b6.zip
cpufreq: pxa: 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 PXA driver. Cc: Eric Miao <eric.y.miao@gmail.com> 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/pxa3xx-cpufreq.c')
-rw-r--r--drivers/cpufreq/pxa3xx-cpufreq.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c
index 65fd01e57cba..ae3ac08a7b23 100644
--- a/drivers/cpufreq/pxa3xx-cpufreq.c
+++ b/drivers/cpufreq/pxa3xx-cpufreq.c
@@ -150,11 +150,6 @@ static void __update_bus_freq(struct pxa3xx_freq_info *info)
cpu_relax();
}
-static int pxa3xx_cpufreq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, pxa3xx_freqs_table);
-}
-
static unsigned int pxa3xx_cpufreq_get(unsigned int cpu)
{
return pxa3xx_get_clk_frequency_khz(0);
@@ -229,17 +224,11 @@ static int pxa3xx_cpufreq_init(struct cpufreq_policy *policy)
return 0;
}
-static int pxa3xx_cpufreq_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
static struct cpufreq_driver pxa3xx_cpufreq_driver = {
- .verify = pxa3xx_cpufreq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = pxa3xx_cpufreq_set,
.init = pxa3xx_cpufreq_init,
- .exit = pxa3xx_cpufreq_exit,
+ .exit = cpufreq_generic_exit,
.get = pxa3xx_cpufreq_get,
.name = "pxa3xx-cpufreq",
};