From patchwork Wed Jun 9 08:30:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 105079 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o598UOEt013474 for ; Wed, 9 Jun 2010 08:30:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756958Ab0FIIaX (ORCPT ); Wed, 9 Jun 2010 04:30:23 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:47364 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756934Ab0FIIaV (ORCPT ); Wed, 9 Jun 2010 04:30:21 -0400 Received: by pvg16 with SMTP id 16so2379326pvg.19 for ; Wed, 09 Jun 2010 01:30:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=aRobUWk3bFdUbW7K/BVRk35YM1bejlQ4j2x1uYGpfhk=; b=YRwEUglrkmD452kFM4pa3j+WL8kfxdsEcOYo8iLv8IIMymNP67JPcijDniJAP0BJho oB1AYPUb99Qe70DWrV8Mv52cOSXEWH4kYxxdTwLrUSPj2TfFd9Zu/f7xbV/MUJKLcdym 2fIboPXkLe31J/X1d0FxAO068s2LnDIQDAqZo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; b=VmVpl13lUXcsEMZVwEwIpfUfrpo/vNeWepk9VwxRdgfKVPs72tjg6pCgwp3kx6v8Up hOG2iSTpsfYrrlRASi3BLofE6OC1/05qWAiPZ8axT2+pxz36Zjz7Q6GE/KZA20CsPiBs sZcDROLTnz6FLUZpPkguqUbHbvgsPlk4h4LUw= Received: by 10.114.187.19 with SMTP id k19mr2177475waf.20.1276072220062; Wed, 09 Jun 2010 01:30:20 -0700 (PDT) Received: from mailhub.coreip.homeip.net (c-24-6-153-206.hsd1.ca.comcast.net [24.6.153.206]) by mx.google.com with ESMTPS id c1sm607614wam.19.2010.06.09.01.30.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 09 Jun 2010 01:30:18 -0700 (PDT) Date: Wed, 9 Jun 2010 01:30:14 -0700 From: Dmitry Torokhov To: =?iso-8859-1?Q?=C9ric?= Piel Cc: "linux-input@vger.kernel.org" , "Rafael J. Wysocki" Subject: Re: [Regression 2.6.35-rc1?] Sysrq works too well (no need of alt) Message-ID: <20100609083014.GA13304@core.coreip.homeip.net> References: <4C0E0E51.8050709@tudelft.nl> <4C0ECA4C.9020806@tudelft.nl> <201006081737.43007.dmitry.torokhov@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201006081737.43007.dmitry.torokhov@gmail.com> User-Agent: Mutt/1.5.20 (2009-12-10) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 09 Jun 2010 08:30:24 +0000 (UTC) diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index c046075..5bf3618 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c @@ -579,8 +579,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: