aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2014-09-10 04:26:17 -0400
committerTony Lindgren <tony@atomide.com>2014-09-11 15:37:23 -0400
commit31957609db529d401658adc2e91ef7df7ea42699 (patch)
treeb020c9ed66a5e51135e1faaa04cc3fd799ce08bc
parent58cda01ed18945c17ad858dfcf4a9a74ba70157c (diff)
ARM: OMAP2+: make of_device_ids const
of_device_ids (i.e. compatible strings and the respective data) are not supposed to change at runtime. All functions working with of_device_ids provided by <linux/of.h> work with const of_device_ids. So mark the non-const function parameters and structs for OMAP2+ as const, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/board-generic.c2
-rw-r--r--arch/arm/mach-omap2/common.h2
-rw-r--r--arch/arm/mach-omap2/gpmc.c2
-rw-r--r--arch/arm/mach-omap2/irq.c2
-rw-r--r--arch/arm/mach-omap2/pdata-quirks.c2
-rw-r--r--arch/arm/mach-omap2/prm_common.c2
-rw-r--r--arch/arm/mach-omap2/timer.c6
7 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 04eaccf00ed8..0b311d51425f 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -27,7 +27,7 @@
27#define gic_of_init NULL 27#define gic_of_init NULL
28#endif 28#endif
29 29
30static struct of_device_id omap_dt_match_table[] __initdata = { 30static const struct of_device_id omap_dt_match_table[] __initconst = {
31 { .compatible = "simple-bus", }, 31 { .compatible = "simple-bus", },
32 { .compatible = "ti,omap-infra", }, 32 { .compatible = "ti,omap-infra", },
33 { } 33 { }
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index dc571f1d3b8a..79664411e794 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -307,7 +307,7 @@ static inline void omap4_cpu_resume(void)
307 307
308#endif 308#endif
309 309
310void pdata_quirks_init(struct of_device_id *); 310void pdata_quirks_init(const struct of_device_id *);
311void omap_auxdata_legacy_init(struct device *dev); 311void omap_auxdata_legacy_init(struct device *dev);
312void omap_pcs_legacy_init(int irq, void (*rearm)(void)); 312void omap_pcs_legacy_init(int irq, void (*rearm)(void));
313 313
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 9f42d5437fcc..4b26e5efa7f7 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1244,7 +1244,7 @@ int gpmc_cs_program_settings(int cs, struct gpmc_settings *p)
1244} 1244}
1245 1245
1246#ifdef CONFIG_OF 1246#ifdef CONFIG_OF
1247static struct of_device_id gpmc_dt_ids[] = { 1247static const struct of_device_id gpmc_dt_ids[] = {
1248 { .compatible = "ti,omap2420-gpmc" }, 1248 { .compatible = "ti,omap2420-gpmc" },
1249 { .compatible = "ti,omap2430-gpmc" }, 1249 { .compatible = "ti,omap2430-gpmc" },
1250 { .compatible = "ti,omap3430-gpmc" }, /* omap3430 & omap3630 */ 1250 { .compatible = "ti,omap3430-gpmc" }, /* omap3430 & omap3630 */
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 35b8590c322e..604a976abf14 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -289,7 +289,7 @@ int __init intc_of_init(struct device_node *node,
289 return 0; 289 return 0;
290} 290}
291 291
292static struct of_device_id irq_match[] __initdata = { 292static const struct of_device_id irq_match[] __initconst = {
293 { .compatible = "ti,omap2-intc", .data = intc_of_init, }, 293 { .compatible = "ti,omap2-intc", .data = intc_of_init, },
294 { } 294 { }
295}; 295};
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index 90c88d498485..05a8c8b07449 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -405,7 +405,7 @@ static void pdata_quirks_check(struct pdata_init *quirks)
405 } 405 }
406} 406}
407 407
408void __init pdata_quirks_init(struct of_device_id *omap_dt_match_table) 408void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table)
409{ 409{
410 omap_sdrc_init(NULL, NULL); 410 omap_sdrc_init(NULL, NULL);
411 pdata_quirks_check(auxdata_quirks); 411 pdata_quirks_check(auxdata_quirks);
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
index 76ca320f007c..74054b813600 100644
--- a/arch/arm/mach-omap2/prm_common.c
+++ b/arch/arm/mach-omap2/prm_common.c
@@ -467,7 +467,7 @@ int prm_unregister(struct prm_ll_data *pld)
467 return 0; 467 return 0;
468} 468}
469 469
470static struct of_device_id omap_prcm_dt_match_table[] = { 470static const struct of_device_id omap_prcm_dt_match_table[] = {
471 { .compatible = "ti,am3-prcm" }, 471 { .compatible = "ti,am3-prcm" },
472 { .compatible = "ti,am3-scrm" }, 472 { .compatible = "ti,am3-scrm" },
473 { .compatible = "ti,am4-prcm" }, 473 { .compatible = "ti,am4-prcm" },
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 43d03fbf4c0b..4f61148ec168 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -141,7 +141,7 @@ static struct property device_disabled = {
141 .value = "disabled", 141 .value = "disabled",
142}; 142};
143 143
144static struct of_device_id omap_timer_match[] __initdata = { 144static const struct of_device_id omap_timer_match[] __initconst = {
145 { .compatible = "ti,omap2420-timer", }, 145 { .compatible = "ti,omap2420-timer", },
146 { .compatible = "ti,omap3430-timer", }, 146 { .compatible = "ti,omap3430-timer", },
147 { .compatible = "ti,omap4430-timer", }, 147 { .compatible = "ti,omap4430-timer", },
@@ -162,7 +162,7 @@ static struct of_device_id omap_timer_match[] __initdata = {
162 * the timer node in device-tree as disabled, to prevent the kernel from 162 * the timer node in device-tree as disabled, to prevent the kernel from
163 * registering this timer as a platform device and so no one else can use it. 163 * registering this timer as a platform device and so no one else can use it.
164 */ 164 */
165static struct device_node * __init omap_get_timer_dt(struct of_device_id *match, 165static struct device_node * __init omap_get_timer_dt(const struct of_device_id *match,
166 const char *property) 166 const char *property)
167{ 167{
168 struct device_node *np; 168 struct device_node *np;
@@ -388,7 +388,7 @@ static u64 notrace dmtimer_read_sched_clock(void)
388 return 0; 388 return 0;
389} 389}
390 390
391static struct of_device_id omap_counter_match[] __initdata = { 391static const struct of_device_id omap_counter_match[] __initconst = {
392 { .compatible = "ti,omap-counter32k", }, 392 { .compatible = "ti,omap-counter32k", },
393 { } 393 { }
394}; 394};