]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: stmmac: anarion: use stmmac_pltfr_probe()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 14 Apr 2025 09:06:10 +0000 (10:06 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 15 Apr 2025 15:36:02 +0000 (08:36 -0700)
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.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1u4Fla-000XjM-Bw@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c

index 941ea724c64328e1ca8fa5a48f7c6e35a8220617..99f6c977ec41cf7ba09620eae6f27b56fb512f1b 100644 (file)
@@ -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, plat_dat, &stmmac_res);
 }
 
 static const struct of_device_id anarion_dwmac_match[] = {