* ARM: locomo: use resource_size instead of PAGE_SIZE for ioremap
@ 2012-04-10 17:07 H Hartley Sweeten
0 siblings, 0 replies; only message in thread
From: H Hartley Sweeten @ 2012-04-10 17:07 UTC (permalink / raw)
To: linux-arm-kernel
Both locomo users, mach-pxa/poodle.c and mach-sa1100/collie.c, define
the memory resource for the locomo driver with a size of 0x2000 (SZ_8K).
Use resource_size() when doing the ioremap so that the correct range
is mapped.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Russell King <linux@arm.linux.org.uk> (maintainer:ARM PORT)
---
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index b55c362..e047c3d 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -391,7 +391,7 @@ __locomo_probe(struct device *me, struct resource *mem, int irq)
* Map the whole region. This also maps the
* registers for our children.
*/
- lchip->base = ioremap(mem->start, PAGE_SIZE);
+ lchip->base = ioremap(mem->start, resource_size(mem));
if (!lchip->base) {
ret = -ENOMEM;
goto out;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-04-10 17:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-10 17:07 ARM: locomo: use resource_size instead of PAGE_SIZE for ioremap 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;
as well as URLs for NNTP newsgroup(s).