* [PATCH] scoop.c: use resource_size()
@ 2011-01-27 17:11 H Hartley Sweeten
0 siblings, 0 replies; only message in thread
From: H Hartley Sweeten @ 2011-01-27 17:11 UTC (permalink / raw)
To: linux-arm-kernel
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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-27 17:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-27 17:11 [PATCH] scoop.c: use resource_size() H Hartley Sweeten
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox