diff options
author | Fabian Frederick <fabf@skynet.be> | 2015-05-01 04:34:01 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-05-04 18:49:38 -0400 |
commit | 03c229906311f3b7232ce134fdd6405288780ed3 (patch) | |
tree | a5810e0b18cef3903ee4a11d6050f3609cf2711c /drivers/cpufreq | |
parent | 52352558d288c3dd5aa40f3bbf736fc005e17f7c (diff) |
cpufreq: pxa: make pxa_freqs arrays const
pxa255_run_freqs and pxa255_turbo_freqs are only read.
This patch updates arrays declaration, find_freq_tables()
and its callsites.
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/pxa2xx-cpufreq.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index fcf6e342da4c..1d99c97defa9 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c | |||
@@ -86,7 +86,7 @@ static unsigned int sdram_rows; | |||
86 | /* Use the run mode frequencies for the CPUFREQ_POLICY_PERFORMANCE policy */ | 86 | /* Use the run mode frequencies for the CPUFREQ_POLICY_PERFORMANCE policy */ |
87 | #define CCLKCFG CCLKCFG_TURBO | CCLKCFG_FCS | 87 | #define CCLKCFG CCLKCFG_TURBO | CCLKCFG_FCS |
88 | 88 | ||
89 | static struct pxa_freqs pxa255_run_freqs[] = | 89 | static const struct pxa_freqs pxa255_run_freqs[] = |
90 | { | 90 | { |
91 | /* CPU MEMBUS CCCR DIV2 CCLKCFG run turbo PXbus SDRAM */ | 91 | /* CPU MEMBUS CCCR DIV2 CCLKCFG run turbo PXbus SDRAM */ |
92 | { 99500, 99500, 0x121, 1, CCLKCFG, -1, -1}, /* 99, 99, 50, 50 */ | 92 | { 99500, 99500, 0x121, 1, CCLKCFG, -1, -1}, /* 99, 99, 50, 50 */ |
@@ -98,7 +98,7 @@ static struct pxa_freqs pxa255_run_freqs[] = | |||
98 | }; | 98 | }; |
99 | 99 | ||
100 | /* Use the turbo mode frequencies for the CPUFREQ_POLICY_POWERSAVE policy */ | 100 | /* Use the turbo mode frequencies for the CPUFREQ_POLICY_POWERSAVE policy */ |
101 | static struct pxa_freqs pxa255_turbo_freqs[] = | 101 | static const struct pxa_freqs pxa255_turbo_freqs[] = |
102 | { | 102 | { |
103 | /* CPU MEMBUS CCCR DIV2 CCLKCFG run turbo PXbus SDRAM */ | 103 | /* CPU MEMBUS CCCR DIV2 CCLKCFG run turbo PXbus SDRAM */ |
104 | { 99500, 99500, 0x121, 1, CCLKCFG, -1, -1}, /* 99, 99, 50, 50 */ | 104 | { 99500, 99500, 0x121, 1, CCLKCFG, -1, -1}, /* 99, 99, 50, 50 */ |
@@ -171,7 +171,7 @@ extern unsigned get_clk_frequency_khz(int info); | |||
171 | 171 | ||
172 | #ifdef CONFIG_REGULATOR | 172 | #ifdef CONFIG_REGULATOR |
173 | 173 | ||
174 | static int pxa_cpufreq_change_voltage(struct pxa_freqs *pxa_freq) | 174 | static int pxa_cpufreq_change_voltage(const struct pxa_freqs *pxa_freq) |
175 | { | 175 | { |
176 | int ret = 0; | 176 | int ret = 0; |
177 | int vmin, vmax; | 177 | int vmin, vmax; |
@@ -211,7 +211,7 @@ static void __init pxa_cpufreq_init_voltages(void) { } | |||
211 | #endif | 211 | #endif |
212 | 212 | ||
213 | static void find_freq_tables(struct cpufreq_frequency_table **freq_table, | 213 | static void find_freq_tables(struct cpufreq_frequency_table **freq_table, |
214 | struct pxa_freqs **pxa_freqs) | 214 | const struct pxa_freqs **pxa_freqs) |
215 | { | 215 | { |
216 | if (cpu_is_pxa25x()) { | 216 | if (cpu_is_pxa25x()) { |
217 | if (!pxa255_turbo_table) { | 217 | if (!pxa255_turbo_table) { |
@@ -270,7 +270,7 @@ static unsigned int pxa_cpufreq_get(unsigned int cpu) | |||
270 | static int pxa_set_target(struct cpufreq_policy *policy, unsigned int idx) | 270 | static int pxa_set_target(struct cpufreq_policy *policy, unsigned int idx) |
271 | { | 271 | { |
272 | struct cpufreq_frequency_table *pxa_freqs_table; | 272 | struct cpufreq_frequency_table *pxa_freqs_table; |
273 | struct pxa_freqs *pxa_freq_settings; | 273 | const struct pxa_freqs *pxa_freq_settings; |
274 | unsigned long flags; | 274 | unsigned long flags; |
275 | unsigned int new_freq_cpu, new_freq_mem; | 275 | unsigned int new_freq_cpu, new_freq_mem; |
276 | unsigned int unused, preset_mdrefr, postset_mdrefr, cclkcfg; | 276 | unsigned int unused, preset_mdrefr, postset_mdrefr, cclkcfg; |
@@ -361,7 +361,7 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) | |||
361 | int i; | 361 | int i; |
362 | unsigned int freq; | 362 | unsigned int freq; |
363 | struct cpufreq_frequency_table *pxa255_freq_table; | 363 | struct cpufreq_frequency_table *pxa255_freq_table; |
364 | struct pxa_freqs *pxa255_freqs; | 364 | const struct pxa_freqs *pxa255_freqs; |
365 | 365 | ||
366 | /* try to guess pxa27x cpu */ | 366 | /* try to guess pxa27x cpu */ |
367 | if (cpu_is_pxa27x()) | 367 | if (cpu_is_pxa27x()) |