Commit 24338a6a authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Andreas Larsson

sparc32: Fix section mismatch in leon_pci_grpci

Passing a datastructre marked _initconst to platform_driver_register()
is wrong. Drop the __initconst notation.

This fixes the following warnings:

WARNING: modpost: vmlinux: section mismatch in reference: grpci1_of_driver+0x30 (section: .data) -> grpci1_of_match (section: .init.rodata)
WARNING: modpost: vmlinux: section mismatch in reference: grpci2_of_driver+0x30 (section: .data) -> grpci2_of_match (section: .init.rodata)
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Andreas Larsson <andreas@gaisler.com>
Fixes: 4154bb82 ("sparc: leon: grpci1: constify of_device_id")
Fixes: 03949b1c ("sparc: leon: grpci2: constify of_device_id")
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Reviewed-by: default avatarAndreas Larsson <andreas@gaisler.com>
Tested-by: default avatarAndreas Larsson <andreas@gaisler.com>
Signed-off-by: default avatarAndreas Larsson <andreas@gaisler.com>
Link: https://lore.kernel.org/r/20240224-sam-fix-sparc32-all-builds-v2-7-1f186603c5c4@ravnborg.org
parent 91d3ff92
......@@ -697,7 +697,7 @@ static int grpci1_of_probe(struct platform_device *ofdev)
return err;
}
static const struct of_device_id grpci1_of_match[] __initconst = {
static const struct of_device_id grpci1_of_match[] = {
{
.name = "GAISLER_PCIFBRG",
},
......
......@@ -889,7 +889,7 @@ static int grpci2_of_probe(struct platform_device *ofdev)
return err;
}
static const struct of_device_id grpci2_of_match[] __initconst = {
static const struct of_device_id grpci2_of_match[] = {
{
.name = "GAISLER_GRPCI2",
},
......
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