diff options
Diffstat (limited to 'drivers/cpufreq/freq_table.c')
-rw-r--r-- | drivers/cpufreq/freq_table.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c index a4818ce88919..551f4ccf87fd 100644 --- a/drivers/cpufreq/freq_table.c +++ b/drivers/cpufreq/freq_table.c | |||
@@ -20,7 +20,7 @@ int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy, | |||
20 | { | 20 | { |
21 | unsigned int min_freq = ~0; | 21 | unsigned int min_freq = ~0; |
22 | unsigned int max_freq = 0; | 22 | unsigned int max_freq = 0; |
23 | unsigned int i = 0; | 23 | unsigned int i; |
24 | 24 | ||
25 | for (i=0; (table[i].frequency != CPUFREQ_TABLE_END); i++) { | 25 | for (i=0; (table[i].frequency != CPUFREQ_TABLE_END); i++) { |
26 | unsigned int freq = table[i].frequency; | 26 | unsigned int freq = table[i].frequency; |
@@ -51,7 +51,7 @@ int cpufreq_frequency_table_verify(struct cpufreq_policy *policy, | |||
51 | struct cpufreq_frequency_table *table) | 51 | struct cpufreq_frequency_table *table) |
52 | { | 52 | { |
53 | unsigned int next_larger = ~0; | 53 | unsigned int next_larger = ~0; |
54 | unsigned int i = 0; | 54 | unsigned int i; |
55 | unsigned int count = 0; | 55 | unsigned int count = 0; |
56 | 56 | ||
57 | dprintk("request for verification of policy (%u - %u kHz) for cpu %u\n", policy->min, policy->max, policy->cpu); | 57 | dprintk("request for verification of policy (%u - %u kHz) for cpu %u\n", policy->min, policy->max, policy->cpu); |
@@ -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 | ||