Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[ARM] 4829/1: add .get method to pxa-cpufreq to silence a warning

The .get method is needed for suspend/resume. Otherwise you
get this in dmesg:

cpufreq: suspend failed to assert current frequency is what timing core thinks it is.
cpufreq: resume failed to assert current frequency is what timing core thinks it is.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Holger Schurig and committed by
Russell King
ea833f0b ac2bf5bd

+7 -1
+7 -1
arch/arm/mach-pxa/cpu-pxa.c
··· 134 134 struct cpufreq_frequency_table *pxa_freqs_table; 135 135 pxa_freqs_t *pxa_freq_settings; 136 136 struct cpufreq_freqs freqs; 137 - int idx; 137 + unsigned int idx; 138 138 unsigned long flags; 139 139 unsigned int unused, preset_mdrefr, postset_mdrefr; 140 140 void *ramstart = phys_to_virt(0xa0000000); ··· 233 233 return 0; 234 234 } 235 235 236 + static unsigned int pxa_cpufreq_get(unsigned int cpu) 237 + { 238 + return get_clk_frequency_khz(0); 239 + } 240 + 236 241 static int pxa_cpufreq_init(struct cpufreq_policy *policy) 237 242 { 238 243 int i; ··· 274 269 .verify = pxa_verify_policy, 275 270 .target = pxa_set_target, 276 271 .init = pxa_cpufreq_init, 272 + .get = pxa_cpufreq_get, 277 273 .name = "PXA25x", 278 274 }; 279 275