Skip to content

Commit

Permalink
Input: tca8418_keypad - remove double read of key event register
Browse files Browse the repository at this point in the history
commit 9dd46c0 upstream.

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

Fixes: ea4348c ("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>
  • Loading branch information
dtor authored and gregkh committed Mar 18, 2018
1 parent 1e10ddb commit 81e510a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/input/keyboard/tca8418_keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 81e510a

Please sign in to comment.