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>
This commit is contained in:

committed by
Arnd Bergmann

parent
543c5040f5
commit
444d2d33d8
@@ -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;
|
||||
|
Reference in New Issue
Block a user