aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/powernow-k6.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-10-03 10:58:17 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-15 18:50:26 -0400
commitd63bd27fe953daa402a108e141c36dcc59c6931c (patch)
tree64aefd0bf380dfca51ea3861eb111b805683edc5 /drivers/cpufreq/powernow-k6.c
parent2633a46c581baa2a9bc33737dfbc792745e30554 (diff)
cpufreq: powernow: 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 powernow driver. 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/powernow-k6.c')
-rw-r--r--drivers/cpufreq/powernow-k6.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/drivers/cpufreq/powernow-k6.c b/drivers/cpufreq/powernow-k6.c
index ab1de0d25099..ff05d284e48e 100644
--- a/drivers/cpufreq/powernow-k6.c
+++ b/drivers/cpufreq/powernow-k6.c
@@ -105,19 +105,6 @@ static void powernow_k6_set_state(struct cpufreq_policy *policy,
105 105
106 106
107/** 107/**
108 * powernow_k6_verify - verifies a new CPUfreq policy
109 * @policy: new policy
110 *
111 * Policy must be within lowest and highest possible CPU Frequency,
112 * and at least one possible state must be within min and max.
113 */
114static int powernow_k6_verify(struct cpufreq_policy *policy)
115{
116 return cpufreq_frequency_table_verify(policy, &clock_ratio[0]);
117}
118
119
120/**
121 * powernow_k6_setpolicy - sets a new CPUFreq policy 108 * powernow_k6_setpolicy - sets a new CPUFreq policy
122 * @policy: new policy 109 * @policy: new policy
123 * @target_freq: the target frequency 110 * @target_freq: the target frequency
@@ -188,19 +175,14 @@ static unsigned int powernow_k6_get(unsigned int cpu)
188 return ret; 175 return ret;
189} 176}
190 177
191static struct freq_attr *powernow_k6_attr[] = {
192 &cpufreq_freq_attr_scaling_available_freqs,
193 NULL,
194};
195
196static struct cpufreq_driver powernow_k6_driver = { 178static struct cpufreq_driver powernow_k6_driver = {
197 .verify = powernow_k6_verify, 179 .verify = cpufreq_generic_frequency_table_verify,
198 .target = powernow_k6_target, 180 .target = powernow_k6_target,
199 .init = powernow_k6_cpu_init, 181 .init = powernow_k6_cpu_init,
200 .exit = powernow_k6_cpu_exit, 182 .exit = powernow_k6_cpu_exit,
201 .get = powernow_k6_get, 183 .get = powernow_k6_get,
202 .name = "powernow-k6", 184 .name = "powernow-k6",
203 .attr = powernow_k6_attr, 185 .attr = cpufreq_generic_attr,
204}; 186};
205 187
206static const struct x86_cpu_id powernow_k6_ids[] = { 188static const struct x86_cpu_id powernow_k6_ids[] = {