From: marek.vasut@gmail.com (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5 v2] ARM: pxa: Fix suspend/resume array index miscalculation
Date: Mon, 10 Jan 2011 23:53:12 +0100 [thread overview]
Message-ID: <1294699993-4712-4-git-send-email-marek.vasut@gmail.com> (raw)
In-Reply-To: <1294699993-4712-1-git-send-email-marek.vasut@gmail.com>
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
v2: Fix loop condition as proposed by Sergei
arch/arm/mach-pxa/irq.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 78f0e0c..a7deff5 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -156,7 +156,7 @@ static inline void __iomem *irq_base(int i)
0x40d00130,
};
- return (void __iomem *)io_p2v(phys_base[i >> 5]);
+ return (void __iomem *)io_p2v(phys_base[i]);
}
void __init pxa_init_irq(int irq_nr, set_wake_t fn)
@@ -168,7 +168,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
pxa_internal_irq_nr = irq_nr;
for (n = 0; n < irq_nr; n += 32) {
- void __iomem *base = irq_base(n);
+ void __iomem *base = irq_base(n >> 5);
__raw_writel(0, base + ICMR); /* disable all IRQs */
__raw_writel(0, base + ICLR); /* all IRQs are IRQ, not FIQ */
@@ -200,7 +200,7 @@ static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
{
int i;
- for (i = 0; i < pxa_internal_irq_nr; i += 32) {
+ for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
void __iomem *base = irq_base(i);
saved_icmr[i] = __raw_readl(base + ICMR);
@@ -219,7 +219,7 @@ static int pxa_irq_resume(struct sys_device *dev)
{
int i;
- for (i = 0; i < pxa_internal_irq_nr; i += 32) {
+ for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
void __iomem *base = irq_base(i);
__raw_writel(saved_icmr[i], base + ICMR);
--
1.7.2.3
next prev parent reply other threads:[~2011-01-10 22:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-10 22:53 [PATCH 1/5 resend] pxa: Fix warning in zeus.c Marek Vasut
2011-01-10 22:53 ` [PATCH 2/5 resend] pxa: Remove unused variable in clock-pxa3xx.c Marek Vasut
2011-01-10 22:53 ` [PATCH 3/5 resend] ARM: pxa: Use cpu_has_ipr() consistently in irq.c Marek Vasut
2011-01-10 22:53 ` Marek Vasut [this message]
2011-01-10 23:41 ` [PATCH 4/5 v2] ARM: pxa: Fix suspend/resume array index miscalculation Eric Miao
2011-01-10 23:46 ` Marek Vasut
2011-01-11 22:45 ` Eric Miao
2011-01-10 22:53 ` [PATCH 5/5 v2] ARM: pxa: Fix recursive call of pxa_(un)mask_low_gpio() Marek Vasut
2011-01-11 23:16 ` Eric Miao
2011-01-12 22:29 ` Marek Vasut
2011-01-12 22:30 ` Marek Vasut
2011-01-12 12:48 ` Sergei Shtylyov
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=1294699993-4712-4-git-send-email-marek.vasut@gmail.com \
--to=marek.vasut@gmail.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).