From patchwork Wed Dec 9 01:36:29 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: 65851 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 nB91aeGN030776 for ; Wed, 9 Dec 2009 01:36:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967105AbZLIBgh (ORCPT ); Tue, 8 Dec 2009 20:36:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S967107AbZLIBgh (ORCPT ); Tue, 8 Dec 2009 20:36:37 -0500 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:59393 "EHLO out1.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967105AbZLIBge (ORCPT ); Tue, 8 Dec 2009 20:36:34 -0500 Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 68BFAC5A24; Tue, 8 Dec 2009 20:36:41 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Tue, 08 Dec 2009 20:36:41 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; s=smtpout; bh=59dG5rfpQNcc2pYgiykOrkz+vog=; b=HGGj2YEJ7W1dGdZLptmqApGzTJOlGv4DJifrDU1G1Te6hsAiidpXpMzXV/MGAtYQKirgMbRYl/xzFXPLYc4fMIA0x+SJY82twOj5B6sTB7/tYlQOkVi5TMiOiGSw6DTLOGDgogicxChqJqdPyoFCtXbtyBnNqXC+OpYTBXeIzKQ= X-Sasl-enc: 3jEBB8ZEvPnrPnPZNCVntyDIzkxB9pOo0VjTvyW3E5eO 1260322601 Received: from khazad-dum.debian.net (unknown [201.82.165.62]) by mail.messagingengine.com (Postfix) with ESMTPSA id F0C601FE29; Tue, 8 Dec 2009 20:36:40 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by localhost.khazad-dum.debian.net (Postfix) with ESMTP id 7C45810013; Tue, 8 Dec 2009 23:36:38 -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 M0K5HPl-UenA; Tue, 8 Dec 2009 23:36:35 -0200 (BRST) Received: by khazad-dum.debian.net (Postfix, from userid 1000) id 04AD51001C; Tue, 8 Dec 2009 23:36:34 -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 , Dmitry Torokhov Subject: [PATCH 09/10] thinkpad-acpi: use input_set_capability Date: Tue, 8 Dec 2009 23:36:29 -0200 Message-Id: <1260322590-5571-10-git-send-email-hmh@hmh.eng.br> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1260322590-5571-1-git-send-email-hmh@hmh.eng.br> References: <1260322590-5571-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 diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index b3e256b..53d6c33 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -3348,16 +3348,14 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) TPACPI_HOTKEY_MAP_SIZE); } - set_bit(EV_KEY, tpacpi_inputdev->evbit); - set_bit(EV_MSC, tpacpi_inputdev->evbit); - set_bit(MSC_SCAN, tpacpi_inputdev->mscbit); + input_set_capability(tpacpi_inputdev, EV_MSC, MSC_SCAN); tpacpi_inputdev->keycodesize = TPACPI_HOTKEY_MAP_TYPESIZE; tpacpi_inputdev->keycodemax = TPACPI_HOTKEY_MAP_LEN; tpacpi_inputdev->keycode = hotkey_keycode_map; for (i = 0; i < TPACPI_HOTKEY_MAP_LEN; i++) { if (hotkey_keycode_map[i] != KEY_RESERVED) { - set_bit(hotkey_keycode_map[i], - tpacpi_inputdev->keybit); + input_set_capability(tpacpi_inputdev, EV_KEY, + hotkey_keycode_map[i]); } else { if (i < sizeof(hotkey_reserved_mask)*8) hotkey_reserved_mask |= 1 << i; @@ -3365,12 +3363,10 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) } if (tp_features.hotkey_wlsw) { - set_bit(EV_SW, tpacpi_inputdev->evbit); - set_bit(SW_RFKILL_ALL, tpacpi_inputdev->swbit); + input_set_capability(tpacpi_inputdev, EV_SW, SW_RFKILL_ALL); } if (tp_features.hotkey_tablet) { - set_bit(EV_SW, tpacpi_inputdev->evbit); - set_bit(SW_TABLET_MODE, tpacpi_inputdev->swbit); + input_set_capability(tpacpi_inputdev, EV_SW, SW_TABLET_MODE); } /* Do not issue duplicate brightness change events to