diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-01-08 01:25:39 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-04-05 13:17:18 -0400 |
commit | 94016680737fd5f9dcfac3fe65b2e61d38fcfba6 (patch) | |
tree | 8973165e59153b5a75cd03b7548f810b9f51e524 | |
parent | 7d8d86252307ce34925c5ddec4ef1b32670353b9 (diff) |
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>
-rw-r--r-- | drivers/input/keyboard/omap-keypad.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index e0d72c8c01e4..d115acf0a805 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c | |||
@@ -133,7 +133,6 @@ static void omap_kp_tasklet(unsigned long data) | |||
133 | unsigned int row_shift = get_count_order(omap_kp_data->cols); | 133 | unsigned int row_shift = get_count_order(omap_kp_data->cols); |
134 | unsigned char new_state[8], changed, key_down = 0; | 134 | unsigned char new_state[8], changed, key_down = 0; |
135 | int col, row; | 135 | int col, row; |
136 | int spurious = 0; | ||
137 | 136 | ||
138 | /* check for any changes */ | 137 | /* check for any changes */ |
139 | omap_kp_scan_keypad(omap_kp_data, new_state); | 138 | omap_kp_scan_keypad(omap_kp_data, new_state); |
@@ -170,12 +169,9 @@ static void omap_kp_tasklet(unsigned long data) | |||
170 | memcpy(keypad_state, new_state, sizeof(keypad_state)); | 169 | memcpy(keypad_state, new_state, sizeof(keypad_state)); |
171 | 170 | ||
172 | if (key_down) { | 171 | if (key_down) { |
173 | int delay = HZ / 20; | ||
174 | /* some key is pressed - keep irq disabled and use timer | 172 | /* some key is pressed - keep irq disabled and use timer |
175 | * to poll the keypad */ | 173 | * to poll the keypad */ |
176 | if (spurious) | 174 | mod_timer(&omap_kp_data->timer, jiffies + HZ / 20); |
177 | delay = 2 * HZ; | ||
178 | mod_timer(&omap_kp_data->timer, jiffies + delay); | ||
179 | } else { | 175 | } else { |
180 | /* enable interrupts */ | 176 | /* enable interrupts */ |
181 | omap_writew(0, OMAP1_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); | 177 | omap_writew(0, OMAP1_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); |