net/stmmac: mark probe function as __devinit
authorArnd Bergmann <[email protected]>
Wed, 8 Aug 2012 04:47:24 +0000 (04:47 +0000)
committerDavid S. Miller <[email protected]>
Wed, 8 Aug 2012 23:08:43 +0000 (16:08 -0700)
Driver probe functions are generally __devinit so they will be
discarded after initialization for non-hotplug kernels.
This was found by a new warning after patch 6a228452d "stmmac: Add
device-tree support" adds a new __devinit function that is called
from stmmac_pltfr_probe.

Without this patch, building socfpga_defconfig results in:

WARNING: drivers/net/ethernet/stmicro/stmmac/stmmac.o(.text+0x5d4c): Section mismatch in reference from the function stmmac_pltfr_probe() to the function .devinit.text:stmmac_probe_config_dt()
The function stmmac_pltfr_probe() references
the function __devinit stmmac_probe_config_dt().
This is often because stmmac_pltfr_probe lacks a __devinit
annotation or the annotation of stmmac_probe_config_dt is wrong.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Stefan Roese <[email protected]>
Cc: Giuseppe Cavallaro <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: [email protected]
Acked-by: Stefan Roese <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c

index cd01ee7ecef19339c90765747a57b2d621765806..b93245c11995bc15329321e6879be78d4c1b44dc 100644 (file)
@@ -74,7 +74,7 @@ static int __devinit stmmac_probe_config_dt(struct platform_device *pdev,
  * the necessary resources and invokes the main to init
  * the net device, register the mdio bus etc.
  */
-static int stmmac_pltfr_probe(struct platform_device *pdev)
+static int __devinit stmmac_pltfr_probe(struct platform_device *pdev)
 {
        int ret = 0;
        struct resource *res;