diff options
author | Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br> | 2010-10-18 17:30:21 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-27 16:40:28 -0400 |
commit | 521e9549d58ebcb53042c7aad6bc60d5c2fc975f (patch) | |
tree | 0430a3996a565ae9c6882e7d750a7193db57f6b1 | |
parent | f444fce3c0aa199facc8c2be7635a4a82b84b71e (diff) |
ARM: 6449/1: Fix for compiler warning of uninitialized variable.
ARM: mach-sa1100: Fix for compiler warning of uninitialized variable.
This is a fix for the compiler warning: 'new_ppcr' may be used
uninitialized in this function.
Signed-off-by: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mach-sa1100/cpu-sa1100.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c index c0a13ef5436..96f7dc103b5 100644 --- a/arch/arm/mach-sa1100/cpu-sa1100.c +++ b/arch/arm/mach-sa1100/cpu-sa1100.c | |||
@@ -184,16 +184,15 @@ static int sa1100_target(struct cpufreq_policy *policy, | |||
184 | { | 184 | { |
185 | unsigned int cur = sa11x0_getspeed(0); | 185 | unsigned int cur = sa11x0_getspeed(0); |
186 | unsigned int new_ppcr; | 186 | unsigned int new_ppcr; |
187 | |||
188 | struct cpufreq_freqs freqs; | 187 | struct cpufreq_freqs freqs; |
188 | |||
189 | new_ppcr = sa11x0_freq_to_ppcr(target_freq); | ||
189 | switch(relation){ | 190 | switch(relation){ |
190 | case CPUFREQ_RELATION_L: | 191 | case CPUFREQ_RELATION_L: |
191 | new_ppcr = sa11x0_freq_to_ppcr(target_freq); | ||
192 | if (sa11x0_ppcr_to_freq(new_ppcr) > policy->max) | 192 | if (sa11x0_ppcr_to_freq(new_ppcr) > policy->max) |
193 | new_ppcr--; | 193 | new_ppcr--; |
194 | break; | 194 | break; |
195 | case CPUFREQ_RELATION_H: | 195 | case CPUFREQ_RELATION_H: |
196 | new_ppcr = sa11x0_freq_to_ppcr(target_freq); | ||
197 | if ((sa11x0_ppcr_to_freq(new_ppcr) > target_freq) && | 196 | if ((sa11x0_ppcr_to_freq(new_ppcr) > target_freq) && |
198 | (sa11x0_ppcr_to_freq(new_ppcr - 1) >= policy->min)) | 197 | (sa11x0_ppcr_to_freq(new_ppcr - 1) >= policy->min)) |
199 | new_ppcr--; | 198 | new_ppcr--; |