Message ID | E1u3bfU-000Em3-Mh@rmk-PC.armlinux.org.uk (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | net: stmmac: anarion: cleanups | expand |
On Sat, Apr 12, 2025 at 03:17:12PM +0100, Russell King (Oracle) wrote: > Convert anarion to use devm_stmmac_pltfr_probe() which allows the > removal of an explicit call to stmmac_pltfr_remove(). > > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
On Sun, Apr 13, 2025 at 11:10:24PM +0200, Andrew Lunn wrote: > On Sat, Apr 12, 2025 at 03:17:12PM +0100, Russell King (Oracle) wrote: > > Convert anarion to use devm_stmmac_pltfr_probe() which allows the > > removal of an explicit call to stmmac_pltfr_remove(). > > > > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> > > Reviewed-by: Andrew Lunn <andrew@lunn.ch> Thanks - but nipa found an error in the patch - s/&pdev->dev/pdev/ with the new call. Ditto for "net: stmmac: anarion: use stmmac_pltfr_probe()" so I'll be sending a v2 for both. Do you want me to keep your r-b with that change for both patches?
> Thanks - but nipa found an error in the patch - s/&pdev->dev/pdev/ > with the new call. Ditto for "net: stmmac: anarion: use > stmmac_pltfr_probe()" so I'll be sending a v2 for both. Do you > want me to keep your r-b with that change for both patches? Yes, keep them. The basic idea looks correct, even if you made a minor error. Andrew
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c index 8bbedf32d512..84072c8ed741 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c @@ -113,7 +113,7 @@ static int anarion_dwmac_probe(struct platform_device *pdev) plat_dat->exit = anarion_gmac_exit; plat_dat->bsp_priv = gmac; - return stmmac_pltfr_probe(&pdev->dev, plat_dat, &stmmac_res); + return devm_stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res); } static const struct of_device_id anarion_dwmac_match[] = { @@ -124,7 +124,6 @@ MODULE_DEVICE_TABLE(of, anarion_dwmac_match); static struct platform_driver anarion_dwmac_driver = { .probe = anarion_dwmac_probe, - .remove = stmmac_pltfr_remove, .driver = { .name = "anarion-dwmac", .pm = &stmmac_pltfr_pm_ops,
Convert anarion to use devm_stmmac_pltfr_probe() which allows the removal of an explicit call to stmmac_pltfr_remove(). 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(-)