[U-Boot] [PATCH 06/10] net: fec_mxc: Use udevice to retrive priv, in fec_phy_init
Jagan Teki
jagan at amarulasolutions.com
Mon Jul 30 12:45:05 UTC 2018
Retrive priv via udevice using dev_get_priv, so just
pass udevice pointer.
Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
---
drivers/net/fec_mxc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 11182f27d8..3ae62ff9d1 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -1232,8 +1232,9 @@ static const struct eth_ops fecmxc_ops = {
.read_rom_hwaddr = fecmxc_read_rom_hwaddr,
};
-static int fec_phy_init(struct fec_priv *priv, struct udevice *dev)
+static int fec_phy_init(struct udevice *dev)
{
+ struct fec_priv *priv = dev_get_priv(dev);
struct phy_device *phydev;
int mask = 0xffffffff;
@@ -1292,7 +1293,7 @@ static int fecmxc_probe(struct udevice *dev)
priv->bus = bus;
priv->xcv_type = pdata->phy_interface;
- ret = fec_phy_init(priv, dev);
+ ret = fec_phy_init(dev);
if (ret)
goto err_phy;
--
2.18.0.321.gffc6fa0e3
More information about the U-Boot
mailing list