ARM: make of_device_ids const
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 18 Feb 2015 20:19:56 +0000 (21:19 +0100)
committerArnd Bergmann <arnd@arndb.de>
Thu, 19 Feb 2015 08:44:25 +0000 (09:44 +0100)
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>
15 files changed:
arch/arm/kernel/perf_event_cpu.c
arch/arm/mach-at91/at91rm9200_time.c
arch/arm/mach-at91/pm.c
arch/arm/mach-davinci/da8xx-dt.c
arch/arm/mach-exynos/suspend.c
arch/arm/mach-imx/mmdc.c
arch/arm/mach-keystone/pm_domain.c
arch/arm/mach-mmp/time.c
arch/arm/mach-mvebu/coherency.c
arch/arm/mach-mvebu/pmsu.c
arch/arm/mach-omap2/omap4-common.c
arch/arm/mach-omap2/prm3xxx.c
arch/arm/mach-omap2/prm44xx.c
arch/arm/mach-prima2/platsmp.c
arch/arm/mach-ux500/pm_domains.c

index dd9acc9..61b53c4 100644 (file)
@@ -231,7 +231,7 @@ static void cpu_pmu_destroy(struct arm_pmu *cpu_pmu)
 /*
  * PMU platform driver and devicetree bindings.
  */
-static struct of_device_id cpu_pmu_of_device_ids[] = {
+static const struct of_device_id cpu_pmu_of_device_ids[] = {
        {.compatible = "arm,cortex-a17-pmu",    .data = armv7_a17_pmu_init},
        {.compatible = "arm,cortex-a15-pmu",    .data = armv7_a15_pmu_init},
        {.compatible = "arm,cortex-a12-pmu",    .data = armv7_a12_pmu_init},
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge