diff options
author | Alex Marginean <alexandru.marginean@nxp.com> | 2019-11-25 17:15:11 +0200 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2019-12-09 09:47:43 -0600 |
commit | a5d32c37d9eec2f819273536a5600a0fbde09acb (patch) | |
tree | b5baa429e020e0e8ed89961226b248d2ec062a71 /net | |
parent | 16cdc2daa07986243751a9f545aa287c60e04ced (diff) | |
download | u-boot-a5d32c37d9eec2f819273536a5600a0fbde09acb.tar.gz |
net: mdio-uclass: rename arguments of dm_mdio_phy_connect for clarity
Renamed dm_mdio_phy_connect arguments dev to mdiodev and addr to phyaddr
for a bit more clarity and consistency with the following patches.
Also use NULL instead of 0 on error return path.
Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mdio-uclass.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/mdio-uclass.c b/net/mdio-uclass.c index 6f922e80b6..7a5f1d6dcc 100644 --- a/net/mdio-uclass.c +++ b/net/mdio-uclass.c @@ -104,16 +104,16 @@ static int dm_mdio_pre_remove(struct udevice *dev) return 0; } -struct phy_device *dm_mdio_phy_connect(struct udevice *dev, int addr, +struct phy_device *dm_mdio_phy_connect(struct udevice *mdiodev, int phyaddr, struct udevice *ethdev, phy_interface_t interface) { - struct mdio_perdev_priv *pdata = dev_get_uclass_priv(dev); + struct mdio_perdev_priv *pdata = dev_get_uclass_priv(mdiodev); - if (device_probe(dev)) - return 0; + if (device_probe(mdiodev)) + return NULL; - return phy_connect(pdata->mii_bus, addr, ethdev, interface); + return phy_connect(pdata->mii_bus, phyaddr, ethdev, interface); } UCLASS_DRIVER(mdio) = { |