summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/maple-cpufreq.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-10-03 14:58:12 (GMT)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-15 22:50:26 (GMT)
commitb766b90896203e39c833ec9f76babd5ccb1303b1 (patch)
treecad62919851e2dede8e9f2ce1dfc05eec230f182 /drivers/cpufreq/maple-cpufreq.c
parent6b0f8d737b703f99baf5240d281c28430ed7e775 (diff)
downloadlinux-fsl-qoriq-b766b90896203e39c833ec9f76babd5ccb1303b1.tar.xz
cpufreq: maple: 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 maple driver. Cc: Dmitry Eremin-Solenikov <dbaryshkov@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/maple-cpufreq.c')
-rw-r--r--drivers/cpufreq/maple-cpufreq.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c
index b3fb661..b23d1d8 100644
--- a/drivers/cpufreq/maple-cpufreq.c
+++ b/drivers/cpufreq/maple-cpufreq.c
@@ -64,11 +64,6 @@ static struct cpufreq_frequency_table maple_cpu_freqs[] = {
{0, CPUFREQ_TABLE_END},
};
-static struct freq_attr *maple_cpu_freqs_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
/* Power mode data is an array of the 32 bits PCR values to use for
* the various frequencies, retrieved from the device-tree
*/
@@ -135,11 +130,6 @@ static int maple_scom_query_freq(void)
* Common interface to the cpufreq core
*/
-static int maple_cpufreq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, maple_cpu_freqs);
-}
-
static int maple_cpufreq_target(struct cpufreq_policy *policy,
unsigned int target_freq, unsigned int relation)
{
@@ -190,10 +180,10 @@ static struct cpufreq_driver maple_cpufreq_driver = {
.name = "maple",
.flags = CPUFREQ_CONST_LOOPS,
.init = maple_cpufreq_cpu_init,
- .verify = maple_cpufreq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = maple_cpufreq_target,
.get = maple_cpufreq_get_speed,
- .attr = maple_cpu_freqs_attr,
+ .attr = cpufreq_generic_attr,
};
static int __init maple_cpufreq_init(void)