Commit c51ab067 authored by Ding Xiang's avatar Ding Xiang Committed by David S. Miller

net: ag71xx: use resource_size for the ioremap size

use resource_size to calcuate ioremap size and make
the code simpler.
Signed-off-by: default avatarDing Xiang <dingxiang@cmss.chinamobile.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e9e1dcda
...@@ -1686,7 +1686,7 @@ static int ag71xx_probe(struct platform_device *pdev) ...@@ -1686,7 +1686,7 @@ static int ag71xx_probe(struct platform_device *pdev)
} }
ag->mac_base = devm_ioremap_nocache(&pdev->dev, res->start, ag->mac_base = devm_ioremap_nocache(&pdev->dev, res->start,
res->end - res->start + 1); resource_size(res));
if (!ag->mac_base) { if (!ag->mac_base) {
err = -ENOMEM; err = -ENOMEM;
goto err_free; goto err_free;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment