1
0
Fork 0

pinctrl: mediatek: fix dual-edge code defect

When a dual-edge irq is triggered, an incorrect irq will be reported on
condition that the external signal is not stable and this incorrect irq
has been registered.
Correct the register offset.

Cc: stable@vger.kernel.org
Signed-off-by: Hongkun Cao <hongkun.cao@mediatek.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
hifive-unleashed-5.1
hongkun.cao 2016-05-21 15:23:39 +08:00 committed by Linus Walleij
parent 9feeed94d0
commit 5edf673d07
1 changed files with 3 additions and 2 deletions

View File

@ -1256,9 +1256,10 @@ static void mtk_eint_irq_handler(struct irq_desc *desc)
const struct mtk_desc_pin *pin;
chained_irq_enter(chip, desc);
for (eint_num = 0; eint_num < pctl->devdata->ap_num; eint_num += 32) {
for (eint_num = 0;
eint_num < pctl->devdata->ap_num;
eint_num += 32, reg += 4) {
status = readl(reg);
reg += 4;
while (status) {
offset = __ffs(status);
index = eint_num + offset;