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>
This commit is contained in:

committed by
David S. Miller

parent
6d07a68a59
commit
00e798c7d1
@@ -429,12 +429,10 @@ static int davinci_mdio_probe(struct platform_device *pdev)
|
||||
* defined to support backward compatibility with DTs which assume that
|
||||
* Davinci MDIO will always scan the bus for PHYs detection.
|
||||
*/
|
||||
if (dev->of_node && of_get_child_count(dev->of_node)) {
|
||||
if (dev->of_node && of_get_child_count(dev->of_node))
|
||||
data->skip_scan = true;
|
||||
ret = of_mdiobus_register(data->bus, dev->of_node);
|
||||
} else {
|
||||
ret = mdiobus_register(data->bus);
|
||||
}
|
||||
|
||||
ret = of_mdiobus_register(data->bus, dev->of_node);
|
||||
if (ret)
|
||||
goto bail_out;
|
||||
|
||||
|
Reference in New Issue
Block a user