net: phy: mdio-octeon: Cleanup module loading dependencies
To ensure that the octeon MDIO driver has been loaded, the Cavium ethernet drivers reference a dummy symbol in the MDIO driver. This forces it to be loaded first. And this symbol has not been cleanly implemented, resulting in warnings when build W=1 C=1. Since device tree is being used, and a phandle points to the PHY on the MDIO bus, we can make use of deferred probing. If the PHY fails to connect, it should be because the MDIO bus driver has not loaded yet. Return -EPROBE_DEFER so it will be tried again later. Additionally, add a MODULE_SOFTDEP() to give user space a hint as to what order it should load the modules. v2: s/octoen/octeon/ Add MODULE_SOFTDEP() Cc: Sunil Goutham <sgoutham@marvell.com> Cc: Robert Richter <rrichter@marvell.com> Cc: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
c7b04d1030
commit
791e5f61ae
@@ -108,12 +108,6 @@ static struct platform_driver octeon_mdiobus_driver = {
|
||||
.remove = octeon_mdiobus_remove,
|
||||
};
|
||||
|
||||
void octeon_mdiobus_force_mod_depencency(void)
|
||||
{
|
||||
/* Let ethernet drivers force us to be loaded. */
|
||||
}
|
||||
EXPORT_SYMBOL(octeon_mdiobus_force_mod_depencency);
|
||||
|
||||
module_platform_driver(octeon_mdiobus_driver);
|
||||
|
||||
MODULE_DESCRIPTION("Cavium OCTEON MDIO bus driver");
|
||||
|
Reference in New Issue
Block a user