From: Dmitry Torokhov Date: Wed, 9 Jun 2010 15:13:06 +0000 (-0700) Subject: Input: sysrq - fix "stuck" SysRq mode X-Git-Tag: upstream/snapshot3+hdmi~13508^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5dec51172b81db226a23f309bc737ad021af35b;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 5d15630..5d64e3a 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, case KEY_RIGHTALT: if (value) sysrq_alt = code; - else if (sysrq_down && code == sysrq_alt_use) - sysrq_down = false; + else { + if (sysrq_down && code == sysrq_alt_use) + sysrq_down = false; + + sysrq_alt = 0; + } break; case KEY_SYSRQ: