diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-10-03 18:58:28 +0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-16 02:50:28 +0400 |
commit | 3be1394a6873496c36d99899fb6ba76ff03a2e96 (patch) | |
tree | 14dfe9639b15d5a7b2f5352031601ae9d2422579 /drivers/cpufreq/speedstep-ich.c | |
parent | e2132fa66d1ee74a975fd6c42c0aa2fe91e3fc75 (diff) | |
download | linux-3be1394a6873496c36d99899fb6ba76ff03a2e96.tar.xz |
cpufreq: speedstep: 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 speedstep driver.
Cc: David S. Miller <davem@davemloft.net>
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/speedstep-ich.c')
-rw-r--r-- | drivers/cpufreq/speedstep-ich.c | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c index 86a184eaa815..929a4f0469a3 100644 --- a/drivers/cpufreq/speedstep-ich.c +++ b/drivers/cpufreq/speedstep-ich.c @@ -289,18 +289,6 @@ static int speedstep_target(struct cpufreq_policy *policy, } -/** - * speedstep_verify - verifies a new CPUFreq policy - * @policy: new policy - * - * Limit must be within speedstep_low_freq and speedstep_high_freq, with - * at least one border included. - */ -static int speedstep_verify(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, &speedstep_freqs[0]); -} - struct get_freqs { struct cpufreq_policy *policy; int ret; @@ -352,26 +340,14 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) } -static int speedstep_cpu_exit(struct cpufreq_policy *policy) -{ - cpufreq_frequency_table_put_attr(policy->cpu); - return 0; -} - -static struct freq_attr *speedstep_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - - static struct cpufreq_driver speedstep_driver = { .name = "speedstep-ich", - .verify = speedstep_verify, + .verify = cpufreq_generic_frequency_table_verify, .target = speedstep_target, .init = speedstep_cpu_init, - .exit = speedstep_cpu_exit, + .exit = cpufreq_generic_exit, .get = speedstep_get, - .attr = speedstep_attr, + .attr = cpufreq_generic_attr, }; static const struct x86_cpu_id ss_smi_ids[] = { |