[PATCH] scoop.c: use resource_size()
H Hartley Sweeten
hartleys at visionengravers.com
Thu Jan 27 12:11:35 EST 2011
Use resource_size() instead of calculating the size by hand.
Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
---
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c
index c11af1e..a07b0e7 100644
--- a/arch/arm/common/scoop.c
+++ b/arch/arm/common/scoop.c
@@ -193,7 +193,7 @@ static int __devinit scoop_probe(struct platform_device *pdev)
spin_lock_init(&devptr->scoop_lock);
inf = pdev->dev.platform_data;
- devptr->base = ioremap(mem->start, mem->end - mem->start + 1);
+ devptr->base = ioremap(mem->start, resource_size(mem));
if (!devptr->base) {
ret = -ENOMEM;
More information about the linux-arm-kernel
mailing list