From patchwork Wed Feb 10 02:28:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrique de Moraes Holschuh X-Patchwork-Id: 78281 X-Patchwork-Delegate: lenb@kernel.org 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 o1A2TJGc011741 for ; Wed, 10 Feb 2010 02:29:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755122Ab0BJC3S (ORCPT ); Tue, 9 Feb 2010 21:29:18 -0500 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:58517 "EHLO out2.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754982Ab0BJC3R (ORCPT ); Tue, 9 Feb 2010 21:29:17 -0500 Received: from compute1.internal (compute1 [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 36498DE136; Tue, 9 Feb 2010 21:29:17 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 09 Feb 2010 21:29:17 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:cc:subject:date:message-id; s=smtpout; bh=tDnPTOY4UOec3Ho6+KZ9l+2JMD8=; b=l9KWZlgwHcgGPlHb4O0hX+j5KL1T6ZQ4N6ISVQmaBGD1/PNTl2UBeJel5AMjgRIzoDn4Dzu1iRoo0GtZID1XM1otOwk29HBDyc4y+V24j+XbAJyGCixFxXBsnHprwRassCU1KVV8IGPfGbFAJdu45MoD2T2JUgg4DbMkZG4HxcU= X-Sasl-enc: jCmfJAF/g0ccu07djwmaHIqFwr0+cepiisWU7yFvth0e 1265768956 Received: from khazad-dum.debian.net (unknown [201.82.165.62]) by mail.messagingengine.com (Postfix) with ESMTPSA id B51AC4AC2AC; Tue, 9 Feb 2010 21:29:16 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by localhost.khazad-dum.debian.net (Postfix) with ESMTP id 5452C28059; Wed, 10 Feb 2010 00:29:14 -0200 (BRST) X-Virus-Scanned: Debian amavisd-new at khazad-dum.debian.net Received: from khazad-dum.debian.net ([127.0.0.1]) by localhost (khazad-dum.debian.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id iwxIkJB3Yxi5; Wed, 10 Feb 2010 00:29:13 -0200 (BRST) Received: by khazad-dum.debian.net (Postfix, from userid 1000) id 2D1F228242; Wed, 10 Feb 2010 00:29:13 -0200 (BRST) From: Henrique de Moraes Holschuh To: Len Brown Cc: linux-acpi@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net, Henrique de Moraes Holschuh , Andrew Morton Subject: [PATCH] thinkpad-acpi: make driver events work in NVRAM poll mode Date: Wed, 10 Feb 2010 00:28:58 -0200 Message-Id: <1265768938-12260-1-git-send-email-hmh@hmh.eng.br> X-Mailer: git-send-email 1.6.5.2 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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, 10 Feb 2010 02:29:19 +0000 (UTC) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 933bcc4..5f45083 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -2082,6 +2082,7 @@ static struct attribute_set *hotkey_dev_attributes; static void tpacpi_driver_event(const unsigned int hkey_event); static void hotkey_driver_event(const unsigned int scancode); +static void hotkey_poll_setup(const bool may_warn); /* HKEY.MHKG() return bits */ #define TP_HOTKEY_TABLET_MASK (1 << 3) @@ -2264,6 +2265,8 @@ static int tpacpi_hotkey_driver_mask_set(const u32 mask) rc = hotkey_mask_set((hotkey_acpi_mask | hotkey_driver_mask) & ~hotkey_source_mask); + hotkey_poll_setup(true); + mutex_unlock(&hotkey_mutex); return rc; @@ -2548,7 +2551,7 @@ static void hotkey_poll_stop_sync(void) } /* call with hotkey_mutex held */ -static void hotkey_poll_setup(bool may_warn) +static void hotkey_poll_setup(const bool may_warn) { const u32 poll_driver_mask = hotkey_driver_mask & hotkey_source_mask; const u32 poll_user_mask = hotkey_user_mask & hotkey_source_mask; @@ -2579,7 +2582,7 @@ static void hotkey_poll_setup(bool may_warn) } } -static void hotkey_poll_setup_safe(bool may_warn) +static void hotkey_poll_setup_safe(const bool may_warn) { mutex_lock(&hotkey_mutex); hotkey_poll_setup(may_warn); @@ -2597,7 +2600,11 @@ static void hotkey_poll_set_freq(unsigned int freq) #else /* CONFIG_THINKPAD_ACPI_HOTKEY_POLL */ -static void hotkey_poll_setup_safe(bool __unused) +static void hotkey_poll_setup(const bool __unused) +{ +} + +static void hotkey_poll_setup_safe(const bool __unused) { }