From: hartleys@visionengravers.com (H Hartley Sweeten)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM: locomo: use resource_size instead of PAGE_SIZE for ioremap
Date: Tue, 10 Apr 2012 10:07:33 -0700 [thread overview]
Message-ID: <201204101007.33576.hartleys@visionengravers.com> (raw)
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;
reply other threads:[~2012-04-10 17:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201204101007.33576.hartleys@visionengravers.com \
--to=hartleys@visionengravers.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).