Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: stmmac: sun8i: use stmmac_pltfr_probe()

Using stmmac_pltfr_probe() simplifies the probe function. This will not
only call plat_dat->init (sun8i_dwmac_init), but also plat_dat->exit
(sun8i_dwmac_exit) appropriately if stmmac_dvr_probe() fails. This
results in an overall simplification of the glue driver.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Link: https://patch.msgid.link/E1u4dKb-000dV7-3B@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Russell King (Oracle) and committed by
Jakub Kicinski
4cc8b577 978d13b2

+2 -8
+2 -8
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
··· 1239 1239 if (ret) 1240 1240 return ret; 1241 1241 1242 - ret = sun8i_dwmac_init(pdev, plat_dat->bsp_priv); 1242 + ret = stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res); 1243 1243 if (ret) 1244 1244 goto dwmac_syscon; 1245 - 1246 - ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); 1247 - if (ret) 1248 - goto dwmac_exit; 1249 1245 1250 1246 ndev = dev_get_drvdata(&pdev->dev); 1251 1247 priv = netdev_priv(ndev); ··· 1279 1283 clk_put(gmac->ephy_clk); 1280 1284 dwmac_remove: 1281 1285 pm_runtime_put_noidle(&pdev->dev); 1282 - stmmac_dvr_remove(&pdev->dev); 1283 - dwmac_exit: 1284 - sun8i_dwmac_exit(pdev, gmac); 1286 + stmmac_pltfr_remove(pdev); 1285 1287 dwmac_syscon: 1286 1288 sun8i_dwmac_unset_syscon(gmac); 1287 1289