提交 c51ab067 编写于 作者: D Ding Xiang 提交者: 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: NDing Xiang <dingxiang@cmss.chinamobile.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e9e1dcda
......@@ -1686,7 +1686,7 @@ static int ag71xx_probe(struct platform_device *pdev)
}
ag->mac_base = devm_ioremap_nocache(&pdev->dev, res->start,
res->end - res->start + 1);
resource_size(res));
if (!ag->mac_base) {
err = -ENOMEM;
goto err_free;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册