Commit 5d682fa3 authored by Mark Brown's avatar Mark Brown Committed by Linus Walleij

gpio: xgs-iproc: Fix section mismatch on device tree match table

The table of devicetree identifiers is annotated as __initconst
indicating that it can be discarded after kernel boot but it is
referenced from the driver struct which has no init annotation leading
to a linker warning:

WARNING: vmlinux.o(.data+0x82d58): Section mismatch in reference from the variable bcm_iproc_gpio_driver to the variable .init.rodata:bcm_iproc_gpio_of_match
The variable bcm_iproc_gpio_driver references
the variable __initconst bcm_iproc_gpio_of_match

Since drivers can be probed after init the lack of annotation on the
driver struct is correct so remove the annotation from the match table.

Fixes: 6a41b6c5 ("gpio: Add xgs-iproc driver")
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Reviewed-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 504369cd
......@@ -299,7 +299,7 @@ static int __exit iproc_gpio_remove(struct platform_device *pdev)
return 0;
}
static const struct of_device_id bcm_iproc_gpio_of_match[] __initconst = {
static const struct of_device_id bcm_iproc_gpio_of_match[] = {
{ .compatible = "brcm,iproc-gpio-cca" },
{}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment