diff mbox series

[71/86] gpio: pca953x: use input from regs structure in pca953x_irq_pending()

Message ID 20191205005333.N8NqSIhs2%akpm@linux-foundation.org (mailing list archive)
State New, archived
Headers show
Series [01/86] mm/kasan/common.c: fix compile error | expand

Commit Message

Andrew Morton Dec. 5, 2019, 12:53 a.m. UTC
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: gpio: pca953x: use input from regs structure in pca953x_irq_pending()

While PCA_PCAL is defined for PCA953X type only, we still may use an
offset of the input from regs structure for sake of consistency.

Link: http://lkml.kernel.org/r/20191022172922.61232-10-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/gpio/gpio-pca953x.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

--- a/drivers/gpio/gpio-pca953x.c~gpio-pca953x-use-input-from-regs-structure-in-pca953x_irq_pending
+++ a/drivers/gpio/gpio-pca953x.c
@@ -689,7 +689,7 @@  static bool pca953x_irq_pending(struct p
 			return false;
 
 		/* Check latched inputs and clear interrupt status */
-		ret = pca953x_read_regs(chip, PCA953X_INPUT, cur_stat);
+		ret = pca953x_read_regs(chip, chip->regs->input, cur_stat);
 		if (ret)
 			return false;