diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-06-07 21:43:54 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-07 14:07:22 -0700 |
commit | 809660cbc82d1bef9a2da1839d5c26a53760252c (patch) | |
tree | 9139fbcf3b45229d1c8853ace119df7699c1b60d | |
parent | 74325bf0104573c6dfce42837139aeef3f34be76 (diff) | |
download | lwn-809660cbc82d1bef9a2da1839d5c26a53760252c.tar.gz lwn-809660cbc82d1bef9a2da1839d5c26a53760252c.zip |
net: macb: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/cadence/macb_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index a0c7b1167dbb..7d2fe13a52f8 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); |