From patchwork Tue Apr 14 02:44:13 2009 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: 18008 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3E2iNUW014179 for ; Tue, 14 Apr 2009 02:44:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752261AbZDNCoZ (ORCPT ); Mon, 13 Apr 2009 22:44:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752257AbZDNCoZ (ORCPT ); Mon, 13 Apr 2009 22:44:25 -0400 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:38951 "EHLO out2.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752261AbZDNCoX (ORCPT ); Mon, 13 Apr 2009 22:44:23 -0400 Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 113C1319C54; Mon, 13 Apr 2009 22:44:20 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 13 Apr 2009 22:44:22 -0400 X-Sasl-enc: U+JBfTLI03v8eYdzYhYM5Yd1foX6+FbtgDhDXR1FznGo 1239677059 Received: from khazad-dum.debian.net (unknown [201.82.166.239]) by mail.messagingengine.com (Postfix) with ESMTPSA id 440E348CC2; Mon, 13 Apr 2009 22:44:19 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by localhost.khazad-dum.debian.net (Postfix) with ESMTP id A308210003; Mon, 13 Apr 2009 23:44:16 -0300 (BRT) 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 ZnZljCQXRZfO; Mon, 13 Apr 2009 23:44:15 -0300 (BRT) Received: by khazad-dum.debian.net (Postfix, from userid 1000) id 6C6BB10007; Mon, 13 Apr 2009 23:44:14 -0300 (BRT) From: Henrique de Moraes Holschuh To: Len Brown Cc: linux-acpi@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net, Henrique de Moraes Holschuh Subject: [PATCH 4/5] thinkpad-acpi: simplify module autoloading Date: Mon, 13 Apr 2009 23:44:13 -0300 Message-Id: <1239677054-3221-5-git-send-email-hmh@hmh.eng.br> X-Mailer: git-send-email 1.6.2.1 In-Reply-To: <1239677054-3221-1-git-send-email-hmh@hmh.eng.br> References: <1239677054-3221-1-git-send-email-hmh@hmh.eng.br> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Simplify the module autoloading a great deal, by keying to the HID for the HKEY interface. Only _really_ ancient IBM ThinkPad models like the 240, 240x and 570 lack the HKEY interface, and they're getting their own trimmed-down driver one of these days. Signed-off-by: Henrique de Moraes Holschuh --- drivers/platform/x86/thinkpad_acpi.c | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 7a7cac2..caa774a 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -7861,6 +7861,15 @@ static int __init thinkpad_acpi_module_init(void) MODULE_ALIAS(TPACPI_DRVR_SHORTNAME); /* + * This will autoload the driver in almost every ThinkPad + * in widespread use. + * + * Only _VERY_ old models, like the 240, 240x and 570 lack + * the HKEY event interface. + */ +MODULE_DEVICE_TABLE(acpi, ibm_htk_device_ids); + +/* * DMI matching for module autoloading * * See http://thinkwiki.org/wiki/List_of_DMI_IDs @@ -7872,16 +7881,10 @@ MODULE_ALIAS(TPACPI_DRVR_SHORTNAME); #define IBM_BIOS_MODULE_ALIAS(__type) \ MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW*") -/* Non-ancient thinkpads */ -MODULE_ALIAS("dmi:bvnIBM:*:svnIBM:*:pvrThinkPad*:rvnIBM:*"); -MODULE_ALIAS("dmi:bvnLENOVO:*:svnLENOVO:*:pvrThinkPad*:rvnLENOVO:*"); - /* Ancient thinkpad BIOSes have to be identified by * BIOS type or model number, and there are far less * BIOS types than model numbers... */ -IBM_BIOS_MODULE_ALIAS("I[BDHIMNOTWVYZ]"); -IBM_BIOS_MODULE_ALIAS("1[0368A-GIKM-PST]"); -IBM_BIOS_MODULE_ALIAS("K[UX-Z]"); +IBM_BIOS_MODULE_ALIAS("I[MU]"); /* 570, 570e */ MODULE_AUTHOR("Borislav Deianov "); MODULE_AUTHOR("Henrique de Moraes Holschuh ");