From: Yang Yingliang Date: Mon, 7 Jun 2021 13:43:54 +0000 (+0800) Subject: net: macb: Use devm_platform_get_and_ioremap_resource() X-Git-Tag: baikal/mips/sdk5.9~10650^2~301 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=6b0f25c455540c3ed26d482f48f4738a68467060;p=kernel.git net: macb: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Acked-by: Nicolas Ferre Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index a0c7b1167dbb2..7d2fe13a52f88 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -4655,8 +4655,7 @@ static int macb_probe(struct platform_device *pdev) struct macb *bp; int err, val; - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mem = devm_ioremap_resource(&pdev->dev, regs); + mem = devm_platform_get_and_ioremap_resource(pdev, 0, ®s); if (IS_ERR(mem)) return PTR_ERR(mem);