aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-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