summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorVaishali Thakkar <vaishali.thakkar@oracle.com>2016-04-11 15:58:17 +0530
committerDavid S. Miller <davem@davemloft.net>2016-04-11 15:00:04 -0400
commite0897ae3ec720b1653d4ff9aaf48b532c276ab63 (patch)
treee2630d9be8be28558628c9f49f4d1bd0a24fa8f8 /drivers
parent3484f44c0873652ad16a69a0f20088343a281982 (diff)
downloadlinux-e0897ae3ec720b1653d4ff9aaf48b532c276ab63.tar.bz2
net: fjes: Use resource_size
Use the function resource_size instead of explicit computation. Problem found using Coccinelle. Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/fjes/fjes_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c
index 0ddb54fe3d91..061b4af4ee62 100644
--- a/drivers/net/fjes/fjes_main.c
+++ b/drivers/net/fjes/fjes_main.c
@@ -1129,7 +1129,7 @@ static int fjes_probe(struct platform_device *plat_dev)
res = platform_get_resource(plat_dev, IORESOURCE_MEM, 0);
hw->hw_res.start = res->start;
- hw->hw_res.size = res->end - res->start + 1;
+ hw->hw_res.size = resource_size(res);
hw->hw_res.irq = platform_get_irq(plat_dev, 0);
err = fjes_hw_init(&adapter->hw);
if (err)