summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/speedstep-centrino.c
diff options
context:
space:
mode:
authorViresh Kumar2013-10-03 16:58:28 +0200
committerRafael J. Wysocki2013-10-16 00:50:28 +0200
commit3be1394a6873496c36d99899fb6ba76ff03a2e96 (patch)
tree14dfe9639b15d5a7b2f5352031601ae9d2422579 /drivers/cpufreq/speedstep-centrino.c
parentcpufreq: spear: Use generic cpufreq routines (diff)
downloadkernel-qcow2-linux-3be1394a6873496c36d99899fb6ba76ff03a2e96.tar.gz
kernel-qcow2-linux-3be1394a6873496c36d99899fb6ba76ff03a2e96.tar.xz
kernel-qcow2-linux-3be1394a6873496c36d99899fb6ba76ff03a2e96.zip
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-centrino.c')
-rw-r--r--drivers/cpufreq/speedstep-centrino.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c
index f180561c3635..c7c14ae1935f 100644
--- a/drivers/cpufreq/speedstep-centrino.c
+++ b/drivers/cpufreq/speedstep-centrino.c
@@ -420,19 +420,6 @@ static int centrino_cpu_exit(struct cpufreq_policy *policy)
}
/**
- * centrino_verify - verifies a new CPUFreq policy
- * @policy: new policy
- *
- * Limit must be within this model's frequency range at least one
- * border included.
- */
-static int centrino_verify (struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy,
- per_cpu(centrino_model, policy->cpu)->op_points);
-}
-
-/**
* centrino_setpolicy - set a new CPUFreq policy
* @policy: new policy
* @target_freq: the target frequency
@@ -553,20 +540,15 @@ out:
return retval;
}
-static struct freq_attr* centrino_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver centrino_driver = {
.name = "centrino", /* should be speedstep-centrino,
but there's a 16 char limit */
.init = centrino_cpu_init,
.exit = centrino_cpu_exit,
- .verify = centrino_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = centrino_target,
.get = get_cur_freq,
- .attr = centrino_attr,
+ .attr = cpufreq_generic_attr,
};
/*