aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/speedstep-centrino.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-10-03 10:58:28 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-15 18:50:28 -0400
commit3be1394a6873496c36d99899fb6ba76ff03a2e96 (patch)
tree14dfe9639b15d5a7b2f5352031601ae9d2422579 /drivers/cpufreq/speedstep-centrino.c
parente2132fa66d1ee74a975fd6c42c0aa2fe91e3fc75 (diff)
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)
420} 420}
421 421
422/** 422/**
423 * centrino_verify - verifies a new CPUFreq policy
424 * @policy: new policy
425 *
426 * Limit must be within this model's frequency range at least one
427 * border included.
428 */
429static int centrino_verify (struct cpufreq_policy *policy)
430{
431 return cpufreq_frequency_table_verify(policy,
432 per_cpu(centrino_model, policy->cpu)->op_points);
433}
434
435/**
436 * centrino_setpolicy - set a new CPUFreq policy 423 * centrino_setpolicy - set a new CPUFreq policy
437 * @policy: new policy 424 * @policy: new policy
438 * @target_freq: the target frequency 425 * @target_freq: the target frequency
@@ -553,20 +540,15 @@ out:
553 return retval; 540 return retval;
554} 541}
555 542
556static struct freq_attr* centrino_attr[] = {
557 &cpufreq_freq_attr_scaling_available_freqs,
558 NULL,
559};
560
561static struct cpufreq_driver centrino_driver = { 543static struct cpufreq_driver centrino_driver = {
562 .name = "centrino", /* should be speedstep-centrino, 544 .name = "centrino", /* should be speedstep-centrino,
563 but there's a 16 char limit */ 545 but there's a 16 char limit */
564 .init = centrino_cpu_init, 546 .init = centrino_cpu_init,
565 .exit = centrino_cpu_exit, 547 .exit = centrino_cpu_exit,
566 .verify = centrino_verify, 548 .verify = cpufreq_generic_frequency_table_verify,
567 .target = centrino_target, 549 .target = centrino_target,
568 .get = get_cur_freq, 550 .get = get_cur_freq,
569 .attr = centrino_attr, 551 .attr = cpufreq_generic_attr,
570}; 552};
571 553
572/* 554/*