summaryrefslogtreecommitdiff
path: root/drivers/net/phy/mdio-gpio.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-05-16 21:20:36 +0300
committerDavid S. Miller <davem@davemloft.net>2018-05-16 21:20:36 +0300
commitb0ec758510c0bafd2ea17edf01aa76ab87e29900 (patch)
tree831558f37e80e04ed2caf7cb7fc36bd397b52cdb /drivers/net/phy/mdio-gpio.c
parentc6213eb1aee308e67377fd1890d84f7284caf531 (diff)
parent00e798c7d1ea5c4514401f17db8300db934291cb (diff)
downloadlinux-b0ec758510c0bafd2ea17edf01aa76ab87e29900.tar.xz
Merge branch 'of-mdio-Fall-back-to-mdiobus_register-with-NULL-device_node'
Florian Fainelli says: ==================== of: mdio: Fall back to mdiobus_register() with NULL device_node This patch series updates of_mdiobus_register() such that when the device_node argument is NULL, it calls mdiobus_register() directly. This is consistent with the behavior of of_mdiobus_register() when CONFIG_OF=n. I only converted the most obvious drivers, there are others that have a much less obvious behavior and specifically attempt to deal with CONFIG_ACPI. Changes in v2: - fixed build error in davincin_mdio.c (Grygorii) - reworked first patch a bit: commit message, subject and removed useless code comment ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/mdio-gpio.c')
-rw-r--r--drivers/net/phy/mdio-gpio.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
index b501221819e1..4e4c8daf44c3 100644
--- a/drivers/net/phy/mdio-gpio.c
+++ b/drivers/net/phy/mdio-gpio.c
@@ -179,11 +179,7 @@ static int mdio_gpio_probe(struct platform_device *pdev)
if (!new_bus)
return -ENODEV;
- if (pdev->dev.of_node)
- ret = of_mdiobus_register(new_bus, pdev->dev.of_node);
- else
- ret = mdiobus_register(new_bus);
-
+ ret = of_mdiobus_register(new_bus, pdev->dev.of_node);
if (ret)
mdio_gpio_bus_deinit(&pdev->dev);