diff options
author | hongkun.cao <hongkun.cao@mediatek.com> | 2016-05-21 15:23:39 +0800 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-06-17 09:11:50 -0400 |
commit | 466a158ee7f1913f104b04b7e14baccd95af15bf (patch) | |
tree | 2763d1744fcbd3acd2c42d38c7bc02cc57860def | |
parent | 3de5aac328d5006b251fff8b3bf0c4940898ad42 (diff) | |
download | linux-stable-466a158ee7f1913f104b04b7e14baccd95af15bf.tar.gz linux-stable-466a158ee7f1913f104b04b7e14baccd95af15bf.tar.bz2 linux-stable-466a158ee7f1913f104b04b7e14baccd95af15bf.zip |
pinctrl: mediatek: fix dual-edge code defect
[ Upstream commit 5edf673d07fdcb6498be24914f3f38f8d8843199 ]
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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r-- | drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c index de08175aef0a..d32a72e96c72 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -1030,9 +1030,10 @@ static void mtk_eint_irq_handler(unsigned irq, 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; |