Skip to content

Commit

Permalink
PCI: spear: Fix Section mismatch compilation warning for probe()
Browse files Browse the repository at this point in the history
Following compilation warning occurs when compiled with:
CONFIG_DEBUG_SECTION_MISMATCH=y

 WARNING: drivers/pci/host/built-in.o(.data+0xc0): Section mismatch in
 reference from the variable spear13xx_pcie_driver to the function
 .init.text:spear13xx_pcie_probe()

Both .probe() and pcie_init() are marked with __init, but spear13xx_pcie_driver
isn't. And so section mismatch.

Fix it by marking spear13xx_pcie_driver with __initdata.

Fixes: 51b66a6 (PCI: spear: Add PCIe driver for ST Microelectronics SPEAr13xx)
Reported-by: Olof Johansson <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
Signed-off-by: Olof Johansson <[email protected]>
  • Loading branch information
vireshk authored and olofj committed Jul 20, 2014
1 parent b776eec commit 6675ef2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/host/pcie-spear13xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ static const struct of_device_id spear13xx_pcie_of_match[] = {
};
MODULE_DEVICE_TABLE(of, spear13xx_pcie_of_match);

static struct platform_driver spear13xx_pcie_driver = {
static struct platform_driver spear13xx_pcie_driver __initdata = {
.probe = spear13xx_pcie_probe,
.remove = spear13xx_pcie_remove,
.driver = {
Expand Down

0 comments on commit 6675ef2

Please sign in to comment.