[CPUFREQ] speedstep-ich: fix error caused by 394122ab144dae4b276d74644a2f11c44a60ac5c

"[CPUFREQ] cpumask: avoid playing with cpus_allowed in speedstep-ich.c"
changed the code to mistakenly pass the current cpu as the "processor"
argument of speedstep_get_frequency(), whereas it should be the type of
the processor.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14340

Based on a patch by Dave Mueller.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Dominik Brodowski <linux@brodo.de>
Reported-by: Dave Mueller <dave.mueller@gmx.ch>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Jones <davej@redhat.com>

authored by Rusty Russell and committed by Dave Jones 8dca15e4 e77b89f1

+7 -12
+7 -12
arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
··· 232 232 return 0; 233 233 } 234 234 235 - struct get_freq_data { 236 - unsigned int speed; 237 - unsigned int processor; 238 - }; 239 - 240 - static void get_freq_data(void *_data) 235 + static void get_freq_data(void *_speed) 241 236 { 242 - struct get_freq_data *data = _data; 237 + unsigned int *speed = _speed; 243 238 244 - data->speed = speedstep_get_frequency(data->processor); 239 + *speed = speedstep_get_frequency(speedstep_processor); 245 240 } 246 241 247 242 static unsigned int speedstep_get(unsigned int cpu) 248 243 { 249 - struct get_freq_data data = { .processor = cpu }; 244 + unsigned int speed; 250 245 251 246 /* You're supposed to ensure CPU is online. */ 252 - if (smp_call_function_single(cpu, get_freq_data, &data, 1) != 0) 247 + if (smp_call_function_single(cpu, get_freq_data, &speed, 1) != 0) 253 248 BUG(); 254 249 255 - dprintk("detected %u kHz as current frequency\n", data.speed); 256 - return data.speed; 250 + dprintk("detected %u kHz as current frequency\n", speed); 251 + return speed; 257 252 } 258 253 259 254 /**