aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/kirkwood-cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/kirkwood-cpufreq.c')
-rw-r--r--drivers/cpufreq/kirkwood-cpufreq.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c
index fff8653c8e9b..0ae4dd7e1f2d 100644
--- a/drivers/cpufreq/kirkwood-cpufreq.c
+++ b/drivers/cpufreq/kirkwood-cpufreq.c
@@ -55,8 +55,8 @@ static unsigned int kirkwood_cpufreq_get_cpu_frequency(unsigned int cpu)
55 return kirkwood_freq_table[0].frequency; 55 return kirkwood_freq_table[0].frequency;
56} 56}
57 57
58static void kirkwood_cpufreq_set_cpu_state(struct cpufreq_policy *policy, 58static int kirkwood_cpufreq_target(struct cpufreq_policy *policy,
59 unsigned int index) 59 unsigned int index)
60{ 60{
61 struct cpufreq_freqs freqs; 61 struct cpufreq_freqs freqs;
62 unsigned int state = kirkwood_freq_table[index].driver_data; 62 unsigned int state = kirkwood_freq_table[index].driver_data;
@@ -100,19 +100,6 @@ static void kirkwood_cpufreq_set_cpu_state(struct cpufreq_policy *policy,
100 local_irq_enable(); 100 local_irq_enable();
101 } 101 }
102 cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); 102 cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
103};
104
105static int kirkwood_cpufreq_target(struct cpufreq_policy *policy,
106 unsigned int target_freq,
107 unsigned int relation)
108{
109 unsigned int index = 0;
110
111 if (cpufreq_frequency_table_target(policy, kirkwood_freq_table,
112 target_freq, relation, &index))
113 return -EINVAL;
114
115 kirkwood_cpufreq_set_cpu_state(policy, index);
116 103
117 return 0; 104 return 0;
118} 105}
@@ -126,7 +113,7 @@ static int kirkwood_cpufreq_cpu_init(struct cpufreq_policy *policy)
126static struct cpufreq_driver kirkwood_cpufreq_driver = { 113static struct cpufreq_driver kirkwood_cpufreq_driver = {
127 .get = kirkwood_cpufreq_get_cpu_frequency, 114 .get = kirkwood_cpufreq_get_cpu_frequency,
128 .verify = cpufreq_generic_frequency_table_verify, 115 .verify = cpufreq_generic_frequency_table_verify,
129 .target = kirkwood_cpufreq_target, 116 .target_index = kirkwood_cpufreq_target,
130 .init = kirkwood_cpufreq_cpu_init, 117 .init = kirkwood_cpufreq_cpu_init,
131 .exit = cpufreq_generic_exit, 118 .exit = cpufreq_generic_exit,
132 .name = "kirkwood-cpufreq", 119 .name = "kirkwood-cpufreq",