From 5d682fa3d8943c19a632ebeaf70e8b9e41c78a5b Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 5 Nov 2019 12:49:15 +0000 Subject: 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: 6a41b6c5fc20 ("gpio: Add xgs-iproc driver") Signed-off-by: Mark Brown Reviewed-by: Chris Packham Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Linus Walleij --- drivers/gpio/gpio-xgs-iproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpio') diff --git a/drivers/gpio/gpio-xgs-iproc.c b/drivers/gpio/gpio-xgs-iproc.c index a3fdd95cc9e6..bb183f584d92 100644 --- a/drivers/gpio/gpio-xgs-iproc.c +++ b/drivers/gpio/gpio-xgs-iproc.c @@ -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" }, {} }; -- cgit v1.2.3