From: Sean Young Date: Sun, 8 Apr 2018 10:36:40 +0000 (-0400) Subject: media: rc: mce_kbd decoder: fix stuck keys X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=99ebaf4f43dd25e18baf02c994c7939f1257f8a3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git media: rc: mce_kbd decoder: fix stuck keys commit 63039c29f7a4ce8a8bd165173840543c0098d7b0 upstream. The MCE Remote sends a 0 scancode when keys are released. If this is not received or decoded, then keys can get "stuck"; the keyup event is not sent since the input_sync() is missing from the timeout handler. Cc: stable@vger.kernel.org Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/media/rc/ir-mce_kbd-decoder.c b/drivers/media/rc/ir-mce_kbd-decoder.c index 7c572a643656..2a1728edb3c6 100644 --- a/drivers/media/rc/ir-mce_kbd-decoder.c +++ b/drivers/media/rc/ir-mce_kbd-decoder.c @@ -130,6 +130,8 @@ static void mce_kbd_rx_timeout(unsigned long data) for (i = 0; i < MCIR2_MASK_KEYS_START; i++) input_report_key(mce_kbd->idev, kbd_keycodes[i], 0); + + input_sync(mce_kbd->idev); } static enum mce_kbd_mode mce_kbd_mode(struct mce_kbd_dec *data)