• Arnd Bergmann's avatar
    cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype · fb2a24a1
    Arnd Bergmann authored
    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: 03c22990 (cpufreq: pxa: make pxa_freqs arrays const)
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    Cc: 4.2+ <stable@vger.kernel.org> # 4.2+
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    fb2a24a1
pxa2xx-cpufreq.c 13.4 KB