Skip to content

Commit

Permalink
net: ag71xx: use resource_size for the ioremap size
Browse files Browse the repository at this point in the history
use resource_size to calcuate ioremap size and make
the code simpler.

Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ding Xiang authored and David S. Miller committed Jul 29, 2019
1 parent e9e1dcd commit c51ab06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/atheros/ag71xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c51ab06

Please sign in to comment.