Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1429242 > unrolled thread

[PATCH 4.4 42/75] pinctrl: mediatek: fix dual-edge code defect

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-06-23 01:10 +0200
Last post2016-06-23 01:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.4 42/75] pinctrl: mediatek: fix dual-edge code defect Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-23 01:10 +0200

#1429242 — [PATCH 4.4 42/75] pinctrl: mediatek: fix dual-edge code defect

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-06-23 01:10 +0200
Subject[PATCH 4.4 42/75] pinctrl: mediatek: fix dual-edge code defect
Message-ID<rMZrr-1su-19@gated-at.bofh.it>
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: hongkun.cao <hongkun.cao@mediatek.com>

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>

---
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- 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
 	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;

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web