diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-06-09 11:13:06 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-06-09 11:13:56 -0400 |
commit | f5dec51172b81db226a23f309bc737ad021af35b (patch) | |
tree | 06fa3d4fbd4a9fc347d355151b0bf9fefcf5f41e /drivers/char/sysrq.c | |
parent | cd9b6fdf798841eb15253f928e762eee5260d347 (diff) |
Input: sysrq - fix "stuck" SysRq mode
This shoud fix the problem with SysRq mode staying half-way enabled
and interfereing with normal PrtScrn operation after user presses ALT
for the first time.
Reported-and-tested-by: Éric Piel <E.A.B.Piel@tudelft.nl>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/char/sysrq.c')
-rw-r--r-- | drivers/char/sysrq.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 5d15630a5830..5d64e3acb000 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -580,8 +580,12 @@ static bool sysrq_filter(struct input_handle *handle, unsigned int type, | |||
580 | case KEY_RIGHTALT: | 580 | case KEY_RIGHTALT: |
581 | if (value) | 581 | if (value) |
582 | sysrq_alt = code; | 582 | sysrq_alt = code; |
583 | else if (sysrq_down && code == sysrq_alt_use) | 583 | else { |
584 | sysrq_down = false; | 584 | if (sysrq_down && code == sysrq_alt_use) |
585 | sysrq_down = false; | ||
586 | |||
587 | sysrq_alt = 0; | ||
588 | } | ||
585 | break; | 589 | break; |
586 | 590 | ||
587 | case KEY_SYSRQ: | 591 | case KEY_SYSRQ: |