From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: grant.likely@secretlab.ca, torvalds@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] gpio: langwell_gpio: ack the correct bit for langwell gpio interrupts
Date: Fri, 08 Jul 2011 10:02:18 +0100 [thread overview]
Message-ID: <20110708090218.18318.32875.stgit@bob.linux.org.uk> (raw)
From: Mathias Nyman <mathias.nyman@linux.intel.com>
The wrong bit was masked when acking langwell gpio interrupts.
Reason for maskig the wrong bit was probably because__ffs() and ffs() functions
return bit indexes differently (0..31 vs 1..32)
This fixes langwell based devices from hanging when a gpio interrupt is
triggered and undoes the breakage which occurred in change set
732063b92bb727b27e61580ce278dddefe31c6ad
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
---
drivers/gpio/langwell_gpio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpio/langwell_gpio.c b/drivers/gpio/langwell_gpio.c
index bd6571e..644ba12 100644
--- a/drivers/gpio/langwell_gpio.c
+++ b/drivers/gpio/langwell_gpio.c
@@ -223,7 +223,7 @@ static void lnw_irq_handler(unsigned irq, struct irq_desc *desc)
gedr = gpio_reg(&lnw->chip, base, GEDR);
pending = readl(gedr);
while (pending) {
- gpio = __ffs(pending) - 1;
+ gpio = __ffs(pending);
mask = BIT(gpio);
pending &= ~mask;
/* Clear before handling so we can't lose an edge */
next reply other threads:[~2011-07-08 9:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-08 9:02 Alan Cox [this message]
2011-07-08 15:33 ` [PATCH] gpio: langwell_gpio: ack the correct bit for langwell gpio interrupts Grant Likely
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=20110708090218.18318.32875.stgit@bob.linux.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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).