summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/pxa2xx-cpufreq.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-10-03 20:28:20 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-16 00:50:27 +0200
commitbf36e48d737ebcb2282f51c08e9c7667e30ed3b6 (patch)
tree99b08a7669f4280a8b2926a826368dd7d8e61e6e /drivers/cpufreq/pxa2xx-cpufreq.c
parentc3bc3d67ff07c1986e8ededc14e3fbdd26528f17 (diff)
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/pxa2xx-cpufreq.c')
-rw-r--r--drivers/cpufreq/pxa2xx-cpufreq.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c
index 236531a0753a..82905fe0041b 100644
--- a/drivers/cpufreq/pxa2xx-cpufreq.c
+++ b/drivers/cpufreq/pxa2xx-cpufreq.c
@@ -262,23 +262,6 @@ static u32 mdrefr_dri(unsigned int freq)
return (interval - (cpu_is_pxa27x() ? 31 : 0)) / 32;
}
-/* find a valid frequency point */
-static int pxa_verify_policy(struct cpufreq_policy *policy)
-{
- struct cpufreq_frequency_table *pxa_freqs_table;
- pxa_freqs_t *pxa_freqs;
- int ret;
-
- find_freq_tables(&pxa_freqs_table, &pxa_freqs);
- ret = cpufreq_frequency_table_verify(policy, pxa_freqs_table);
-
- if (freq_debug)
- pr_debug("Verified CPU policy: %dKhz min to %dKhz max\n",
- policy->min, policy->max);
-
- return ret;
-}
-
static unsigned int pxa_cpufreq_get(unsigned int cpu)
{
return get_clk_frequency_khz(0);
@@ -465,17 +448,11 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy)
return 0;
}
-static int pxa_cpufreq_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
static struct cpufreq_driver pxa_cpufreq_driver = {
- .verify = pxa_verify_policy,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = pxa_set_target,
.init = pxa_cpufreq_init,
- .exit = pxa_cpufreq_exit,
+ .exit = cpufreq_generic_exit,
.get = pxa_cpufreq_get,
.name = "PXA2xx",
};