Skip to content

Commit

Permalink
watchdog: at91sam9: at91_wdt_dt_ids cannot be __init
Browse files Browse the repository at this point in the history
The device IDs are referenced by the driver and potentially
used beyond the init time, as kbuild correctly warns
about. Remove the __initconst annotation.

Without this patch, building at91_dt_defconfig results in:

WARNING: drivers/watchdog/built-in.o(.data+0x28): Section mismatch in reference from the variable at91wdt_driver to the (unknown reference) .init.rodata:(unknown)
The variable at91wdt_driver references
the (unknown reference) __initconst (unknown)

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Tested-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: linux-watchdog@vger.kernel.org
  • Loading branch information
Arnd Bergmann authored and Wim Van Sebroeck committed Mar 1, 2013
1 parent 12a5c05 commit 6c41e47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/at91sam9_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static int __exit at91wdt_remove(struct platform_device *pdev)
}

#if defined(CONFIG_OF)
static const struct of_device_id at91_wdt_dt_ids[] __initconst = {
static const struct of_device_id at91_wdt_dt_ids[] = {
{ .compatible = "atmel,at91sam9260-wdt" },
{ /* sentinel */ }
};
Expand Down

0 comments on commit 6c41e47

Please sign in to comment.