diff options
author | hongkun.cao <hongkun.cao@mediatek.com> | 2016-05-21 15:23:39 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-24 10:18:20 -0700 |
commit | b5ff1d6012726f539723c24712bb71976ee2bc77 (patch) | |
tree | 4f62677a816da57cc2ca5586046afff76a39314b | |
parent | a976f62a601a763ea37d116d5a9009a2eec9d0f3 (diff) | |
download | linux-stable-b5ff1d6012726f539723c24712bb71976ee2bc77.tar.gz linux-stable-b5ff1d6012726f539723c24712bb71976ee2bc77.tar.bz2 linux-stable-b5ff1d6012726f539723c24712bb71976ee2bc77.zip |
pinctrl: mediatek: fix dual-edge code defect
commit 5edf673d07fdcb6498be24914f3f38f8d8843199 upstream.
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.
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 3d8019eb3d84..181b35879ebd 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -1191,9 +1191,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; |