Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: omap-keypad - remove adjusting of scan delay

As of 35f8679f577ae5673a778598bcbe7b45cbec8923 ("Input: omap-keypad -
remove dead check") we no longer declare keypresses as spurious, therefore
we can use constant delay between scans.

Suggested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

+1 -5
+1 -5
drivers/input/keyboard/omap-keypad.c
··· 133 133 unsigned int row_shift = get_count_order(omap_kp_data->cols); 134 134 unsigned char new_state[8], changed, key_down = 0; 135 135 int col, row; 136 - int spurious = 0; 137 136 138 137 /* check for any changes */ 139 138 omap_kp_scan_keypad(omap_kp_data, new_state); ··· 169 170 memcpy(keypad_state, new_state, sizeof(keypad_state)); 170 171 171 172 if (key_down) { 172 - int delay = HZ / 20; 173 173 /* some key is pressed - keep irq disabled and use timer 174 174 * to poll the keypad */ 175 - if (spurious) 176 - delay = 2 * HZ; 177 - mod_timer(&omap_kp_data->timer, jiffies + delay); 175 + mod_timer(&omap_kp_data->timer, jiffies + HZ / 20); 178 176 } else { 179 177 /* enable interrupts */ 180 178 omap_writew(0, OMAP1_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT);