diff options
author | Ding Xiang <dingxiang@cmss.chinamobile.com> | 2019-07-29 11:01:22 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-29 18:48:23 +0200 |
commit | c51ab067c5312695331129806cb9a42791903305 (patch) | |
tree | c0b2053b93f0316e0dfa5378d7aad8472c126525 /drivers/net/ethernet/atheros | |
parent | Merge branch 'nfc-next' (diff) | |
download | linux-c51ab067c5312695331129806cb9a42791903305.tar.xz linux-c51ab067c5312695331129806cb9a42791903305.zip |
net: ag71xx: use resource_size for the ioremap size
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>
Diffstat (limited to 'drivers/net/ethernet/atheros')
-rw-r--r-- | drivers/net/ethernet/atheros/ag71xx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c index 8b69d0d7e726..77542bd1e5bd 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -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; |