diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-19 21:51:21 -0400 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-19 21:51:21 -0400 | 
| commit | bbf70132db2767f66b411fa90488aacac72e06dd (patch) | |
| tree | 19bebd76503c351f74e2fc24ac161b20c8d30fd4 /drivers/cpufreq/freq_table.c | |
| parent | 2090af718014f3d434fb8b85b00eeea01ebcec19 (diff) | |
| parent | 6ccf58ab22499139bacc683493c9fd70af55adbb (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] sets nforce2 minimum PLL divider to 2.
  [CPUFREQ] Make powernow-k7 work on SMP kernels.
  [CPUFREQ] cpufreq core {d,}printk adjustments
  [CPUFREQ] dprintk adjustments to cpufreq-speedstep-centrino
  [CPUFREQ] dprintk adjustments to cpufreq-nforce2
  [CPUFREQ] Prepare powernow-k8 for future CPUs.
  [CPUFREQ] Make acpi-cpufreq 'sticky'.
  [CPUFREQ] Remove strange No-op from longrun.c
  [CPUFREQ] Remove more freq_table reinitialisations.
  [CPUFREQ] Fix another redundant initialisation in freq_table
  [CPUFREQ] Remove duplicate assignment in freq_table
  [CPUFREQ] CodingStyle nits in cpufreq_stats.c
  [CPUFREQ] Remove duplicate assignment from cpufreq-nforce2
  [CPUFREQ] Remove pointless reinitialisations in acpi-cpufreq
  [CPUFREQ] Remove pointless reinitialisation from powernow-k8
  [CPUFREQ] Remove redundant initialisation from longhaul.
  [CPUFREQ] Clean up longhaul's speed pretty-printer
  [CPUFREQ] Disambiguate loop indexes in powernow-k7
  [CPUFREQ] Typo in powernow-k8
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 | ||
