diff options
author | 2025-04-15 13:58:05 +0100 | |
---|---|---|
committer | 2025-04-17 18:41:40 -0700 | |
commit | dd2cdba4709f6a4e32e7e323d23922e99916a781 (patch) | |
tree | bb1f44a164271dd0d1802877d1118c9de2038c4e | |
parent | net: stmmac: sunxi: convert to set_clk_tx_rate() (diff) | |
download | wireguard-linux-dd2cdba4709f6a4e32e7e323d23922e99916a781.tar.xz wireguard-linux-dd2cdba4709f6a4e32e7e323d23922e99916a781.zip |
net: stmmac: sunxi: use stmmac_pltfr_probe()
Rather than open-coding the calls to sun7i_gmac_init() and
sun7i_gmac_exit() in the probe function, use stmmac_pltfr_probe()
which will automatically call the plat_dat->init() and plat_dat->exit()
methods appropriately. This simplifies the code.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1u4frZ-000nMl-BB@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c index a245c223a18f..665eab1d3409 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c @@ -144,20 +144,7 @@ static int sun7i_gmac_probe(struct platform_device *pdev) plat_dat->tx_fifo_size = 4096; plat_dat->rx_fifo_size = 16384; - ret = sun7i_gmac_init(pdev, plat_dat->bsp_priv); - if (ret) - return ret; - - ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); - if (ret) - goto err_gmac_exit; - - return 0; - -err_gmac_exit: - sun7i_gmac_exit(pdev, plat_dat->bsp_priv); - - return ret; + return stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res); } static const struct of_device_id sun7i_dwmac_match[] = { |