Commit 7a1874a0 authored by Viresh Kumar's avatar Viresh Kumar Committed by Rafael J. Wysocki

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: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent a8f64dec
...@@ -295,12 +295,6 @@ static int us2e_freq_target(struct cpufreq_policy *policy, ...@@ -295,12 +295,6 @@ static int us2e_freq_target(struct cpufreq_policy *policy,
return 0; return 0;
} }
static int us2e_freq_verify(struct cpufreq_policy *policy)
{
return cpufreq_frequency_table_verify(policy,
&us2e_freq_table[policy->cpu].table[0]);
}
static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy) static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy)
{ {
unsigned int cpu = policy->cpu; unsigned int cpu = policy->cpu;
...@@ -363,7 +357,7 @@ static int __init us2e_freq_init(void) ...@@ -363,7 +357,7 @@ static int __init us2e_freq_init(void)
goto err_out; goto err_out;
driver->init = us2e_freq_cpu_init; driver->init = us2e_freq_cpu_init;
driver->verify = us2e_freq_verify; driver->verify = cpufreq_generic_frequency_table_verify;
driver->target = us2e_freq_target; driver->target = us2e_freq_target;
driver->get = us2e_freq_get; driver->get = us2e_freq_get;
driver->exit = us2e_freq_cpu_exit; driver->exit = us2e_freq_cpu_exit;
......
...@@ -156,12 +156,6 @@ static int us3_freq_target(struct cpufreq_policy *policy, ...@@ -156,12 +156,6 @@ static int us3_freq_target(struct cpufreq_policy *policy,
return 0; return 0;
} }
static int us3_freq_verify(struct cpufreq_policy *policy)
{
return cpufreq_frequency_table_verify(policy,
&us3_freq_table[policy->cpu].table[0]);
}
static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) static int __init us3_freq_cpu_init(struct cpufreq_policy *policy)
{ {
unsigned int cpu = policy->cpu; unsigned int cpu = policy->cpu;
...@@ -224,7 +218,7 @@ static int __init us3_freq_init(void) ...@@ -224,7 +218,7 @@ static int __init us3_freq_init(void)
goto err_out; goto err_out;
driver->init = us3_freq_cpu_init; driver->init = us3_freq_cpu_init;
driver->verify = us3_freq_verify; driver->verify = cpufreq_generic_frequency_table_verify;
driver->target = us3_freq_target; driver->target = us3_freq_target;
driver->get = us3_freq_get; driver->get = us3_freq_get;
driver->exit = us3_freq_cpu_exit; driver->exit = us3_freq_cpu_exit;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment