ARM: 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 structs in arch/arm as const, too.

While at it also add some __initconst annotations.

Acked-by: Jason Cooper <jason@lakedameon.net>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by Uwe Kleine-König and committed by Arnd Bergmann 444d2d33 543c5040

Changed files
+16 -16
arch
arm
kernel
mach-at91
mach-davinci
mach-exynos
mach-imx
mach-keystone
mach-mmp
mach-mvebu
mach-omap2
mach-prima2
mach-ux500
+1 -1
arch/arm/kernel/perf_event_cpu.c
··· 231 231 /* 232 232 * PMU platform driver and devicetree bindings. 233 233 */ 234 - static struct of_device_id cpu_pmu_of_device_ids[] = { 234 + static const struct of_device_id cpu_pmu_of_device_ids[] = { 235 235 {.compatible = "arm,cortex-a17-pmu", .data = armv7_a17_pmu_init}, 236 236 {.compatible = "arm,cortex-a15-pmu", .data = armv7_a15_pmu_init}, 237 237 {.compatible = "arm,cortex-a12-pmu", .data = armv7_a12_pmu_init},
+1 -1
arch/arm/mach-at91/at91rm9200_time.c
··· 183 183 void __iomem *at91_st_base; 184 184 EXPORT_SYMBOL_GPL(at91_st_base); 185 185 186 - static struct of_device_id at91rm9200_st_timer_ids[] = { 186 + static const struct of_device_id at91rm9200_st_timer_ids[] = { 187 187 { .compatible = "atmel,at91rm9200-st" }, 188 188 { /* sentinel */ } 189 189 };
+2 -2
arch/arm/mach-at91/pm.c
··· 226 226 } 227 227 } 228 228 229 - static struct of_device_id ramc_ids[] = { 229 + static const struct of_device_id ramc_ids[] __initconst = { 230 230 { .compatible = "atmel,at91rm9200-sdramc", .data = at91rm9200_standby }, 231 231 { .compatible = "atmel,at91sam9260-sdramc", .data = at91sam9_sdram_standby }, 232 232 { .compatible = "atmel,at91sam9g45-ddramc", .data = at91_ddr_standby }, ··· 234 234 { /*sentinel*/ } 235 235 }; 236 236 237 - static void at91_dt_ramc(void) 237 + static __init void at91_dt_ramc(void) 238 238 { 239 239 struct device_node *np; 240 240 const struct of_device_id *of_id;
+1 -1
arch/arm/mach-davinci/da8xx-dt.c
··· 20 20 21 21 #define DA8XX_NUM_UARTS 3 22 22 23 - static struct of_device_id da8xx_irq_match[] __initdata = { 23 + static const struct of_device_id da8xx_irq_match[] __initconst = { 24 24 { .compatible = "ti,cp-intc", .data = cp_intc_of_init, }, 25 25 { } 26 26 };
+1 -1
arch/arm/mach-exynos/suspend.c
··· 587 587 .cpu_suspend = exynos5420_cpu_suspend, 588 588 }; 589 589 590 - static struct of_device_id exynos_pmu_of_device_ids[] = { 590 + static const struct of_device_id exynos_pmu_of_device_ids[] __initconst = { 591 591 { 592 592 .compatible = "samsung,exynos3250-pmu", 593 593 .data = &exynos3250_pm_data,
+1 -1
arch/arm/mach-imx/mmdc.c
··· 68 68 return ddr_type; 69 69 } 70 70 71 - static struct of_device_id imx_mmdc_dt_ids[] = { 71 + static const struct of_device_id imx_mmdc_dt_ids[] = { 72 72 { .compatible = "fsl,imx6q-mmdc", }, 73 73 { /* sentinel */ } 74 74 };
+1 -1
arch/arm/mach-keystone/pm_domain.c
··· 61 61 .pm_domain = &keystone_pm_domain, 62 62 }; 63 63 64 - static struct of_device_id of_keystone_table[] = { 64 + static const struct of_device_id of_keystone_table[] = { 65 65 {.compatible = "ti,keystone"}, 66 66 { /* end of list */ }, 67 67 };
+1 -1
arch/arm/mach-mmp/time.c
··· 213 213 } 214 214 215 215 #ifdef CONFIG_OF 216 - static struct of_device_id mmp_timer_dt_ids[] = { 216 + static const struct of_device_id mmp_timer_dt_ids[] = { 217 217 { .compatible = "mrvl,mmp-timer", }, 218 218 {} 219 219 };
+1 -1
arch/arm/mach-mvebu/coherency.c
··· 51 51 COHERENCY_FABRIC_TYPE_ARMADA_380, 52 52 }; 53 53 54 - static struct of_device_id of_coherency_table[] = { 54 + static const struct of_device_id of_coherency_table[] = { 55 55 {.compatible = "marvell,coherency-fabric", 56 56 .data = (void *) COHERENCY_FABRIC_TYPE_ARMADA_370_XP }, 57 57 {.compatible = "marvell,armada-375-coherency-fabric",
+1 -1
arch/arm/mach-mvebu/pmsu.c
··· 104 104 105 105 static void *mvebu_cpu_resume; 106 106 107 - static struct of_device_id of_pmsu_table[] = { 107 + static const struct of_device_id of_pmsu_table[] = { 108 108 { .compatible = "marvell,armada-370-pmsu", }, 109 109 { .compatible = "marvell,armada-370-xp-pmsu", }, 110 110 { .compatible = "marvell,armada-380-pmsu", },
+1 -1
arch/arm/mach-omap2/omap4-common.c
··· 242 242 } 243 243 omap_early_initcall(omap4_sar_ram_init); 244 244 245 - static struct of_device_id gic_match[] = { 245 + static const struct of_device_id gic_match[] = { 246 246 { .compatible = "arm,cortex-a9-gic", }, 247 247 { .compatible = "arm,cortex-a15-gic", }, 248 248 { },
+1 -1
arch/arm/mach-omap2/prm3xxx.c
··· 674 674 return prm_register(&omap3xxx_prm_ll_data); 675 675 } 676 676 677 - static struct of_device_id omap3_prm_dt_match_table[] = { 677 + static const struct of_device_id omap3_prm_dt_match_table[] = { 678 678 { .compatible = "ti,omap3-prm" }, 679 679 { } 680 680 };
+1 -1
arch/arm/mach-omap2/prm44xx.c
··· 712 712 return prm_register(&omap44xx_prm_ll_data); 713 713 } 714 714 715 - static struct of_device_id omap_prm_dt_match_table[] = { 715 + static const struct of_device_id omap_prm_dt_match_table[] = { 716 716 { .compatible = "ti,omap4-prm" }, 717 717 { .compatible = "ti,omap5-prm" }, 718 718 { .compatible = "ti,dra7-prm" },
+1 -1
arch/arm/mach-prima2/platsmp.c
··· 40 40 spin_unlock(&boot_lock); 41 41 } 42 42 43 - static struct of_device_id clk_ids[] = { 43 + static const struct of_device_id clk_ids[] = { 44 44 { .compatible = "sirf,atlas7-clkc" }, 45 45 {}, 46 46 };
+1 -1
arch/arm/mach-ux500/pm_domains.c
··· 49 49 [DOMAIN_VAPE] = &ux500_pm_domain_vape, 50 50 }; 51 51 52 - static struct of_device_id ux500_pm_domain_matches[] = { 52 + static const struct of_device_id ux500_pm_domain_matches[] __initconst = { 53 53 { .compatible = "stericsson,ux500-pm-domains", }, 54 54 { }, 55 55 };