diff mbox series

[v2,24/46] net: sun8i_emac: Fix not calling dev_xxx with a device

Message ID 20200915144522.509493-25-seanga2@gmail.com
State Accepted
Commit ef043693c6b8ffbf0d17caac5c99855cfaeaef3c
Delegated to: Tom Rini
Headers show
Series dm: Print device name in dev_xxx like Linux | expand

Commit Message

Sean Anderson Sept. 15, 2020, 2:45 p.m. UTC
Pass a udevice into a few functions so `dev` is defined.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

Changes in v2:
- New

 drivers/net/sun8i_emac.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Simon Glass Sept. 17, 2020, 1:10 a.m. UTC | #1
On Tue, 15 Sep 2020 at 08:46, Sean Anderson <seanga2@gmail.com> wrote:
>
> Pass a udevice into a few functions so `dev` is defined.
>
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> ---
>
> Changes in v2:
> - New
>
>  drivers/net/sun8i_emac.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index 546cc6ccb6..1dae81c7bf 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -663,7 +663,8 @@  static int sun8i_eth_write_hwaddr(struct udevice *dev)
 	return _sun8i_write_hwaddr(priv, pdata->enetaddr);
 }
 
-static int sun8i_emac_board_setup(struct emac_eth_dev *priv)
+static int sun8i_emac_board_setup(struct udevice *dev,
+				  struct emac_eth_dev *priv)
 {
 	int ret;
 
@@ -833,7 +834,7 @@  static int sun8i_emac_eth_probe(struct udevice *dev)
 
 	priv->mac_reg = (void *)pdata->iobase;
 
-	ret = sun8i_emac_board_setup(priv);
+	ret = sun8i_emac_board_setup(dev, priv);
 	if (ret)
 		return ret;
 
@@ -854,7 +855,7 @@  static const struct eth_ops sun8i_emac_eth_ops = {
 	.stop                   = sun8i_emac_eth_stop,
 };
 
-static int sun8i_get_ephy_nodes(struct emac_eth_dev *priv)
+static int sun8i_get_ephy_nodes(struct udevice *dev, struct emac_eth_dev *priv)
 {
 	int emac_node, ephy_node, ret, ephy_handle;
 
@@ -986,7 +987,7 @@  static int sun8i_emac_eth_ofdata_to_platdata(struct udevice *dev)
 	}
 
 	if (priv->variant == H3_EMAC) {
-		ret = sun8i_get_ephy_nodes(priv);
+		ret = sun8i_get_ephy_nodes(dev, priv);
 		if (ret)
 			return ret;
 	}