DORMANTno replies

[PATCH] scoop.c: use resource_size()

From: H Hartley Sweeten <hidden>
Date: 2011-01-27 17:11:35
Subsystem: arm port, the rest · Maintainers: Russell King, Linus Torvalds

Use resource_size() instead of calculating the size by hand.

Signed-off-by: H Hartley Sweeten <hsweeten@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;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help