Skip to content

Commit 286ab25

Browse files
arndbgregkh
authored andcommitted
cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype
commit fb2a24a upstream. There are two definitions of pxa_cpufreq_change_voltage, with slightly different prototypes after one of them had its argument marked 'const'. Now the other one (for !CONFIG_REGULATOR) produces a harmless warning: drivers/cpufreq/pxa2xx-cpufreq.c: In function 'pxa_set_target': drivers/cpufreq/pxa2xx-cpufreq.c:291:36: warning: passing argument 1 of 'pxa_cpufreq_change_voltage' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] ret = pxa_cpufreq_change_voltage(&pxa_freq_settings[idx]); ^ drivers/cpufreq/pxa2xx-cpufreq.c:205:12: note: expected 'struct pxa_freqs *' but argument is of type 'const struct pxa_freqs *' static int pxa_cpufreq_change_voltage(struct pxa_freqs *pxa_freq) ^ This changes the prototype in the same way as the other, which avoids the warning. Fixes: 03c2299 (cpufreq: pxa: make pxa_freqs arrays const) Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5c2bd0c commit 286ab25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/cpufreq/pxa2xx-cpufreq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static void __init pxa_cpufreq_init_voltages(void)
202202
}
203203
}
204204
#else
205-
static int pxa_cpufreq_change_voltage(struct pxa_freqs *pxa_freq)
205+
static int pxa_cpufreq_change_voltage(const struct pxa_freqs *pxa_freq)
206206
{
207207
return 0;
208208
}

0 commit comments

Comments
 (0)