Input: tca8418_keypad - remove double read of key event register
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 13 Feb 2017 23:45:59 +0000 (15:45 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Mar 2018 10:18:53 +0000 (11:18 +0100)
commit 9dd46c02532a6bed6240101ecf4bbc407f8c6adf upstream.

There is no need to tread the same register twice in a row.

Fixes: ea4348c8462a ("Input: tca8418_keypad - hide gcc-4.9 -Wmaybe-un ...")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/keyboard/tca8418_keypad.c

index 3048ef3..a5e8998 100644 (file)
@@ -189,8 +189,6 @@ static void tca8418_read_keypad(struct tca8418_keypad *keypad_data)
                input_event(input, EV_MSC, MSC_SCAN, code);
                input_report_key(input, keymap[code], state);
 
-               /* Read for next loop */
-               error = tca8418_read_byte(keypad_data, REG_KEY_EVENT_A, &reg);
        } while (1);
 
        input_sync(input);