From: Rajeev Kumar Date: Thu, 31 Mar 2011 05:33:42 +0000 (-0700) Subject: Input: spear-keyboard - fix inverted condition in interrupt handler X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=799a2a215ed7f9398a8d528767e64b8e39904105;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Input: spear-keyboard - fix inverted condition in interrupt handler We should return IRQ_NONE from interrupt handler in case keyboard does not report DATA_AVAIL condition. Signed-off-by: Rajeev Kumar Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c index bee03d64c453..d712dffd2157 100644 --- a/drivers/input/keyboard/spear-keyboard.c +++ b/drivers/input/keyboard/spear-keyboard.c @@ -69,7 +69,7 @@ static irqreturn_t spear_kbd_interrupt(int irq, void *dev_id) u8 sts, val; sts = readb(kbd->io_base + STATUS_REG); - if (sts & DATA_AVAIL) + if (!(sts & DATA_AVAIL)) return IRQ_NONE; if (kbd->last_key != KEY_RESERVED) {