diff mbox series

[net-next,3/4] net: stmmac: anarion: use stmmac_pltfr_probe()

Message ID E1u3bfP-000Elx-JE@rmk-PC.armlinux.org.uk (mailing list archive)
State New
Headers show
Series net: stmmac: anarion: cleanups | expand

Commit Message

Russell King (Oracle) April 12, 2025, 2:17 p.m. UTC
Rather than open-coding the call to anarion_gmac_init() and then
stmmac_dvr_probe(), omitting the cleanup of calling
anarion_gmac_exit(), use stmmac_pltfr_probe() which will handle this
for us.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Andrew Lunn April 13, 2025, 9:10 p.m. UTC | #1
On Sat, Apr 12, 2025 at 03:17:07PM +0100, Russell King (Oracle) wrote:
> Rather than open-coding the call to anarion_gmac_init() and then
> stmmac_dvr_probe(), omitting the cleanup of calling
> anarion_gmac_exit(), use stmmac_pltfr_probe() which will handle this
> for us.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
diff mbox series

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
index 941ea724c643..8bbedf32d512 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
@@ -111,10 +111,9 @@  static int anarion_dwmac_probe(struct platform_device *pdev)
 
 	plat_dat->init = anarion_gmac_init;
 	plat_dat->exit = anarion_gmac_exit;
-	anarion_gmac_init(pdev, gmac);
 	plat_dat->bsp_priv = gmac;
 
-	return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
+	return stmmac_pltfr_probe(&pdev->dev, plat_dat, &stmmac_res);
 }
 
 static const struct of_device_id anarion_dwmac_match[] = {