Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 444d2d33 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Arnd Bergmann
Browse files

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: default avatarJason Cooper <jason@lakedameon.net>
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 543c5040
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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},
+1 −1
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ static struct clock_event_device clkevt = {
void __iomem *at91_st_base;
EXPORT_SYMBOL_GPL(at91_st_base);

static struct of_device_id at91rm9200_st_timer_ids[] = {
static const struct of_device_id at91rm9200_st_timer_ids[] = {
	{ .compatible = "atmel,at91rm9200-st" },
	{ /* sentinel */ }
};
+2 −2
Original line number Diff line number Diff line
@@ -226,7 +226,7 @@ void at91_pm_set_standby(void (*at91_standby)(void))
	}
}

static struct of_device_id ramc_ids[] = {
static const struct of_device_id ramc_ids[] __initconst = {
	{ .compatible = "atmel,at91rm9200-sdramc", .data = at91rm9200_standby },
	{ .compatible = "atmel,at91sam9260-sdramc", .data = at91sam9_sdram_standby },
	{ .compatible = "atmel,at91sam9g45-ddramc", .data = at91_ddr_standby },
@@ -234,7 +234,7 @@ static struct of_device_id ramc_ids[] = {
	{ /*sentinel*/ }
};

static void at91_dt_ramc(void)
static __init void at91_dt_ramc(void)
{
	struct device_node *np;
	const struct of_device_id *of_id;
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@

#define DA8XX_NUM_UARTS	3

static struct of_device_id da8xx_irq_match[] __initdata = {
static const struct of_device_id da8xx_irq_match[] __initconst = {
	{ .compatible = "ti,cp-intc", .data = cp_intc_of_init, },
	{ }
};
+1 −1
Original line number Diff line number Diff line
@@ -587,7 +587,7 @@ static struct exynos_pm_data exynos5420_pm_data = {
	.cpu_suspend	= exynos5420_cpu_suspend,
};

static struct of_device_id exynos_pmu_of_device_ids[] = {
static const struct of_device_id exynos_pmu_of_device_ids[] __initconst = {
	{
		.compatible = "samsung,exynos3250-pmu",
		.data = &exynos3250_pm_data,
Loading