From patchwork Mon Feb 8 23:50:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 77893 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 o18NpOZQ000513 for ; Mon, 8 Feb 2010 23:51:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753211Ab0BHXvX (ORCPT ); Mon, 8 Feb 2010 18:51:23 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:47319 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752897Ab0BHXvW (ORCPT ); Mon, 8 Feb 2010 18:51:22 -0500 Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [140.211.169.55]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id o18NoxVg029333 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Feb 2010 15:51:00 -0800 Received: from akpm.mtv.corp.google.com (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with SMTP id o18NoxvO010707; Mon, 8 Feb 2010 15:50:59 -0800 Date: Mon, 8 Feb 2010 15:50:59 -0800 From: Andrew Morton To: Thadeu Lima de Souza Cascardo Cc: linux-acpi@vger.kernel.org, Henrique de Moraes Holschuh , ibm-acpi-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] thinkpad-acpi: setup hotkey polling after changing hotkey_driver_mask Message-Id: <20100208155059.eed393a6.akpm@linux-foundation.org> In-Reply-To: <1265567528-1180-1-git-send-email-cascardo@holoscopio.com> References: <1265567528-1180-1-git-send-email-cascardo@holoscopio.com> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.9; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-Spam-Status: No, hits=-5.019 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SUBJECT_BRACKETED, PATCH_SUBJECT_OSDL X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13 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]); Mon, 08 Feb 2010 23:51:24 +0000 (UTC) --- a/drivers/platform/x86/thinkpad_acpi.c~thinkpad-acpi-setup-hotkey-polling-after-changing-hotkey_driver_mask-fix +++ a/drivers/platform/x86/thinkpad_acpi.c @@ -2597,6 +2597,10 @@ static void hotkey_poll_set_freq(unsigne #else /* CONFIG_THINKPAD_ACPI_HOTKEY_POLL */ +static void hotkey_poll_setup(bool __unused) +{ +} + static void hotkey_poll_setup_safe(bool __unused) { } @@ -2694,9 +2698,7 @@ static ssize_t hotkey_mask_store(struct res = hotkey_user_mask_set(t); -#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL hotkey_poll_setup(true); -#endif mutex_unlock(&hotkey_mutex); @@ -6273,9 +6275,7 @@ static int __init brightness_init(struct | TP_ACPI_HKEY_BRGHTUP_MASK | TP_ACPI_HKEY_BRGHTDWN_MASK);; -#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL - hotkey_poll_setup(true); -#endif + hotkey_poll_setup_safe(true); return 0; }