summaryrefslogtreecommitdiff
path: root/drivers/net/gianfar_ptp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/gianfar_ptp.c')
-rw-r--r--drivers/net/gianfar_ptp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/gianfar_ptp.c b/drivers/net/gianfar_ptp.c
index d8e175382d1d..1c97861596f0 100644
--- a/drivers/net/gianfar_ptp.c
+++ b/drivers/net/gianfar_ptp.c
@@ -491,7 +491,7 @@ static int gianfar_ptp_probe(struct platform_device *dev)
spin_lock_init(&etsects->lock);
etsects->regs = ioremap(etsects->rsrc->start,
- 1 + etsects->rsrc->end - etsects->rsrc->start);
+ resource_size(etsects->rsrc));
if (!etsects->regs) {
pr_err("ioremap ptp registers failed\n");
goto no_ioremap;