aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2006-05-30 18:09:31 -0400
committerDave Jones <davej@redhat.com>2006-05-30 18:09:31 -0400
commit484944a5b002cf87b38a8f073d37afcfb8afff28 (patch)
tree40a960d5b4bee4ea5e4bafb2f1017f5d98484b87
parent5557976ca97c3a3002805f575a45ad354e1050ff (diff)
[CPUFREQ] Remove more freq_table reinitialisations.
Signed-off-by: Dave Jones <davej@redhat.com>
-rw-r--r--drivers/cpufreq/freq_table.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c
index 427bf7a60d63..551f4ccf87fd 100644
--- a/drivers/cpufreq/freq_table.c
+++ b/drivers/cpufreq/freq_table.c
@@ -91,20 +91,24 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
91 unsigned int relation, 91 unsigned int relation,
92 unsigned int *index) 92 unsigned int *index)
93{ 93{
94 struct cpufreq_frequency_table optimal = { .index = ~0, }; 94 struct cpufreq_frequency_table optimal = {
95 struct cpufreq_frequency_table suboptimal = { .index = ~0, }; 95 .index = ~0,
96 .frequency = 0,
97 };
98 struct cpufreq_frequency_table suboptimal = {
99 .index = ~0,
100 .frequency = 0,
101 };
96 unsigned int i; 102 unsigned int i;
97 103
98 dprintk("request for target %u kHz (relation: %u) for cpu %u\n", target_freq, relation, policy->cpu); 104 dprintk("request for target %u kHz (relation: %u) for cpu %u\n", target_freq, relation, policy->cpu);
99 105
100 switch (relation) { 106 switch (relation) {
101 case CPUFREQ_RELATION_H: 107 case CPUFREQ_RELATION_H:
102 optimal.frequency = 0;
103 suboptimal.frequency = ~0; 108 suboptimal.frequency = ~0;
104 break; 109 break;
105 case CPUFREQ_RELATION_L: 110 case CPUFREQ_RELATION_L:
106 optimal.frequency = ~0; 111 optimal.frequency = ~0;
107 suboptimal.frequency = 0;
108 break; 112 break;
109 } 113 }
110 114