diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2018-05-15 16:56:19 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-16 14:20:36 -0400 |
commit | 00e798c7d1ea5c4514401f17db8300db934291cb (patch) | |
tree | 831558f37e80e04ed2caf7cb7fc36bd397b52cdb /drivers/net/ethernet/marvell/mvmdio.c | |
parent | 6d07a68a59274fa168a3ddfbcfe5df029ba0afed (diff) | |
download | lwn-00e798c7d1ea5c4514401f17db8300db934291cb.tar.gz lwn-00e798c7d1ea5c4514401f17db8300db934291cb.zip |
drivers: net: Remove device_node checks with of_mdiobus_register()
A number of drivers have the following pattern:
if (np)
of_mdiobus_register()
else
mdiobus_register()
which the implementation of of_mdiobus_register() now takes care of.
Remove that pattern in drivers that strictly adhere to it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Antoine Tenart <antoine.tenart@bootlin.com>
Reviewed-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/mvmdio.c')
-rw-r--r-- | drivers/net/ethernet/marvell/mvmdio.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c index 0495487f7b42..c5dac6bd2be4 100644 --- a/drivers/net/ethernet/marvell/mvmdio.c +++ b/drivers/net/ethernet/marvell/mvmdio.c @@ -348,10 +348,7 @@ static int orion_mdio_probe(struct platform_device *pdev) goto out_mdio; } - if (pdev->dev.of_node) - ret = of_mdiobus_register(bus, pdev->dev.of_node); - else - ret = mdiobus_register(bus); + ret = of_mdiobus_register(bus, pdev->dev.of_node); if (ret < 0) { dev_err(&pdev->dev, "Cannot register MDIO bus (%d)\n", ret); goto out_mdio; |