diff options
| author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2015-02-18 15:19:56 -0500 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2015-02-19 03:44:25 -0500 |
| commit | 444d2d33d8564f95df851ddaca80f640ca36934d (patch) | |
| tree | 2fa4198807c79f1e670f3f8a934786a203bcab09 | |
| parent | 543c5040f564c80fe59ae82a60fc061055d04a41 (diff) | |
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>
| -rw-r--r-- | arch/arm/kernel/perf_event_cpu.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-at91/at91rm9200_time.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-at91/pm.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-davinci/da8xx-dt.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-exynos/suspend.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-imx/mmdc.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-keystone/pm_domain.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-mmp/time.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-mvebu/coherency.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-mvebu/pmsu.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap4-common.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/prm3xxx.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/prm44xx.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-prima2/platsmp.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/pm_domains.c | 2 |
15 files changed, 16 insertions, 16 deletions
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c index dd9acc95ebc0..61b53c46edfa 100644 --- a/arch/arm/kernel/perf_event_cpu.c +++ b/arch/arm/kernel/perf_event_cpu.c | |||
| @@ -231,7 +231,7 @@ static void cpu_pmu_destroy(struct arm_pmu *cpu_pmu) | |||
| 231 | /* | 231 | /* |
| 232 | * PMU platform driver and devicetree bindings. | 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 | {.compatible = "arm,cortex-a17-pmu", .data = armv7_a17_pmu_init}, | 235 | {.compatible = "arm,cortex-a17-pmu", .data = armv7_a17_pmu_init}, |
| 236 | {.compatible = "arm,cortex-a15-pmu", .data = armv7_a15_pmu_init}, | 236 | {.compatible = "arm,cortex-a15-pmu", .data = armv7_a15_pmu_init}, |
| 237 | {.compatible = "arm,cortex-a12-pmu", .data = armv7_a12_pmu_init}, | 237 | {.compatible = "arm,cortex-a12-pmu", .data = armv7_a12_pmu_init}, |
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c index 51761f8927b7..b00d09555f2b 100644 --- a/arch/arm/mach-at91/at91rm9200_time.c +++ b/arch/arm/mach-at91/at91rm9200_time.c | |||
| @@ -183,7 +183,7 @@ static struct clock_event_device clkevt = { | |||
| 183 | void __iomem *at91_st_base; | 183 | void __iomem *at91_st_base; |
| 184 | EXPORT_SYMBOL_GPL(at91_st_base); | 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 | { .compatible = "atmel,at91rm9200-st" }, | 187 | { .compatible = "atmel,at91rm9200-st" }, |
| 188 | { /* sentinel */ } | 188 | { /* sentinel */ } |
| 189 | }; | 189 | }; |
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index af8d8afc2e12..5e34fb143309 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
| @@ -226,7 +226,7 @@ void at91_pm_set_standby(void (*at91_standby)(void)) | |||
| 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 | { .compatible = "atmel,at91rm9200-sdramc", .data = at91rm9200_standby }, | 230 | { .compatible = "atmel,at91rm9200-sdramc", .data = at91rm9200_standby }, |
| 231 | { .compatible = "atmel,at91sam9260-sdramc", .data = at91sam9_sdram_standby }, | 231 | { .compatible = "atmel,at91sam9260-sdramc", .data = at91sam9_sdram_standby }, |
| 232 | { .compatible = "atmel,at91sam9g45-ddramc", .data = at91_ddr_standby }, | 232 | { .compatible = "atmel,at91sam9g45-ddramc", .data = at91_ddr_standby }, |
| @@ -234,7 +234,7 @@ static struct of_device_id ramc_ids[] = { | |||
| 234 | { /*sentinel*/ } | 234 | { /*sentinel*/ } |
| 235 | }; | 235 | }; |
| 236 | 236 | ||
| 237 | static void at91_dt_ramc(void) | 237 | static __init void at91_dt_ramc(void) |
| 238 | { | 238 | { |
| 239 | struct device_node *np; | 239 | struct device_node *np; |
| 240 | const struct of_device_id *of_id; | 240 | const struct of_device_id *of_id; |
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index f703d82f08a8..438f68547f4c 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | #define DA8XX_NUM_UARTS 3 | 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 | { .compatible = "ti,cp-intc", .data = cp_intc_of_init, }, | 24 | { .compatible = "ti,cp-intc", .data = cp_intc_of_init, }, |
| 25 | { } | 25 | { } |
| 26 | }; | 26 | }; |
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index 666ec3e5b03f..52e2b1a2fddb 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c | |||
| @@ -587,7 +587,7 @@ static struct exynos_pm_data exynos5420_pm_data = { | |||
| 587 | .cpu_suspend = exynos5420_cpu_suspend, | 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 | .compatible = "samsung,exynos3250-pmu", | 592 | .compatible = "samsung,exynos3250-pmu", |
| 593 | .data = &exynos3250_pm_data, | 593 | .data = &exynos3250_pm_data, |
diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c index a377f95033ae..0411f0664c15 100644 --- a/arch/arm/mach-imx/mmdc.c +++ b/arch/arm/mach-imx/mmdc.c | |||
| @@ -68,7 +68,7 @@ int imx_mmdc_get_ddr_type(void) | |||
| 68 | return ddr_type; | 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 | { .compatible = "fsl,imx6q-mmdc", }, | 72 | { .compatible = "fsl,imx6q-mmdc", }, |
| 73 | { /* sentinel */ } | 73 | { /* sentinel */ } |
| 74 | }; | 74 | }; |
diff --git a/arch/arm/mach-keystone/pm_domain.c b/arch/arm/mach-keystone/pm_domain.c index ef6041e7e675..41bebfd296dc 100644 --- a/arch/arm/mach-keystone/pm_domain.c +++ b/arch/arm/mach-keystone/pm_domain.c | |||
| @@ -61,7 +61,7 @@ static struct pm_clk_notifier_block platform_domain_notifier = { | |||
| 61 | .pm_domain = &keystone_pm_domain, | 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 | {.compatible = "ti,keystone"}, | 65 | {.compatible = "ti,keystone"}, |
| 66 | { /* end of list */ }, | 66 | { /* end of list */ }, |
| 67 | }; | 67 | }; |
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c index 2756351dbb35..10bfa03e58d4 100644 --- a/arch/arm/mach-mmp/time.c +++ b/arch/arm/mach-mmp/time.c | |||
| @@ -213,7 +213,7 @@ void __init timer_init(int irq) | |||
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | #ifdef CONFIG_OF | 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 | { .compatible = "mrvl,mmp-timer", }, | 217 | { .compatible = "mrvl,mmp-timer", }, |
| 218 | {} | 218 | {} |
| 219 | }; | 219 | }; |
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c index b5895f040caa..e46e9ea1e187 100644 --- a/arch/arm/mach-mvebu/coherency.c +++ b/arch/arm/mach-mvebu/coherency.c | |||
| @@ -51,7 +51,7 @@ enum { | |||
| 51 | COHERENCY_FABRIC_TYPE_ARMADA_380, | 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 | {.compatible = "marvell,coherency-fabric", | 55 | {.compatible = "marvell,coherency-fabric", |
| 56 | .data = (void *) COHERENCY_FABRIC_TYPE_ARMADA_370_XP }, | 56 | .data = (void *) COHERENCY_FABRIC_TYPE_ARMADA_370_XP }, |
| 57 | {.compatible = "marvell,armada-375-coherency-fabric", | 57 | {.compatible = "marvell,armada-375-coherency-fabric", |
diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c index d8ab605a44fa..8b9f5e202ccf 100644 --- a/arch/arm/mach-mvebu/pmsu.c +++ b/arch/arm/mach-mvebu/pmsu.c | |||
| @@ -104,7 +104,7 @@ static void __iomem *pmsu_mp_base; | |||
| 104 | 104 | ||
| 105 | static void *mvebu_cpu_resume; | 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 | { .compatible = "marvell,armada-370-pmsu", }, | 108 | { .compatible = "marvell,armada-370-pmsu", }, |
| 109 | { .compatible = "marvell,armada-370-xp-pmsu", }, | 109 | { .compatible = "marvell,armada-370-xp-pmsu", }, |
| 110 | { .compatible = "marvell,armada-380-pmsu", }, | 110 | { .compatible = "marvell,armada-380-pmsu", }, |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 2418bdf28ca2..cee0fe1ee6ff 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
| @@ -242,7 +242,7 @@ static int __init omap4_sar_ram_init(void) | |||
| 242 | } | 242 | } |
| 243 | omap_early_initcall(omap4_sar_ram_init); | 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 | { .compatible = "arm,cortex-a9-gic", }, | 246 | { .compatible = "arm,cortex-a9-gic", }, |
| 247 | { .compatible = "arm,cortex-a15-gic", }, | 247 | { .compatible = "arm,cortex-a15-gic", }, |
| 248 | { }, | 248 | { }, |
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c index c5e00c6714b1..5713bbdf83bc 100644 --- a/arch/arm/mach-omap2/prm3xxx.c +++ b/arch/arm/mach-omap2/prm3xxx.c | |||
| @@ -674,7 +674,7 @@ int __init omap3xxx_prm_init(void) | |||
| 674 | return prm_register(&omap3xxx_prm_ll_data); | 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 | { .compatible = "ti,omap3-prm" }, | 678 | { .compatible = "ti,omap3-prm" }, |
| 679 | { } | 679 | { } |
| 680 | }; | 680 | }; |
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c index 408c64efb807..a08a617a6c11 100644 --- a/arch/arm/mach-omap2/prm44xx.c +++ b/arch/arm/mach-omap2/prm44xx.c | |||
| @@ -712,7 +712,7 @@ int __init omap44xx_prm_init(void) | |||
| 712 | return prm_register(&omap44xx_prm_ll_data); | 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 | { .compatible = "ti,omap4-prm" }, | 716 | { .compatible = "ti,omap4-prm" }, |
| 717 | { .compatible = "ti,omap5-prm" }, | 717 | { .compatible = "ti,omap5-prm" }, |
| 718 | { .compatible = "ti,dra7-prm" }, | 718 | { .compatible = "ti,dra7-prm" }, |
diff --git a/arch/arm/mach-prima2/platsmp.c b/arch/arm/mach-prima2/platsmp.c index fc2b03c81e5f..e46c91094dde 100644 --- a/arch/arm/mach-prima2/platsmp.c +++ b/arch/arm/mach-prima2/platsmp.c | |||
| @@ -40,7 +40,7 @@ static void sirfsoc_secondary_init(unsigned int cpu) | |||
| 40 | spin_unlock(&boot_lock); | 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 | { .compatible = "sirf,atlas7-clkc" }, | 44 | { .compatible = "sirf,atlas7-clkc" }, |
| 45 | {}, | 45 | {}, |
| 46 | }; | 46 | }; |
diff --git a/arch/arm/mach-ux500/pm_domains.c b/arch/arm/mach-ux500/pm_domains.c index 0d4b5b46f15b..4d71c90f801c 100644 --- a/arch/arm/mach-ux500/pm_domains.c +++ b/arch/arm/mach-ux500/pm_domains.c | |||
| @@ -49,7 +49,7 @@ static struct generic_pm_domain *ux500_pm_domains[NR_DOMAINS] = { | |||
| 49 | [DOMAIN_VAPE] = &ux500_pm_domain_vape, | 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 | { .compatible = "stericsson,ux500-pm-domains", }, | 53 | { .compatible = "stericsson,ux500-pm-domains", }, |
| 54 | { }, | 54 | { }, |
| 55 | }; | 55 | }; |
