From patchwork Tue Dec 15 23:51:07 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: 68272 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBI4ixjX005715 for ; Fri, 18 Dec 2009 04:45:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754950AbZLOXvW (ORCPT ); Tue, 15 Dec 2009 18:51:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761406AbZLOXvW (ORCPT ); Tue, 15 Dec 2009 18:51:22 -0500 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:55470 "EHLO out1.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754950AbZLOXvU (ORCPT ); Tue, 15 Dec 2009 18:51:20 -0500 Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id AE01EC5B53; Tue, 15 Dec 2009 18:51:19 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Tue, 15 Dec 2009 18:51:19 -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=F5CcWMo0OZj82LjCHPwCsE6ZToo=; b=P9luNTRz1AXLPxwCwK6xwF6lh53pbU0u8mp+o+PMj4ztoR6kC1FLJUyrpwvUKw0exL4zc++Bzy2GdTaUJ5sk6DXK3K8CZHx7s3fIU7khnyrcGXaeHIWdwM0hXot9OFZgAlzC9C4o5AzouMEW6DnyczUF7L9M8swgK7azniH0Yuo= X-Sasl-enc: WMNJWgnSec2HwQs2wBabXatmwWwcer2Dl3N35fDlpS0n 1260921079 Received: from khazad-dum.debian.net (unknown [201.82.165.62]) by mail.messagingengine.com (Postfix) with ESMTPSA id 545FF4AF8F8; Tue, 15 Dec 2009 18:51:19 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by localhost.khazad-dum.debian.net (Postfix) with ESMTP id 8EF2F2805F; Tue, 15 Dec 2009 21:51:17 -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 pEpmJu4wC7YK; Tue, 15 Dec 2009 21:51:16 -0200 (BRST) Received: by khazad-dum.debian.net (Postfix, from userid 1000) id 10C0E28234; Tue, 15 Dec 2009 21:51:16 -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 , Josip Rodin Subject: [PATCH 2/8] thinkpad-acpi: log initial state of rfkill switches Date: Tue, 15 Dec 2009 21:51:07 -0200 Message-Id: <1260921073-7686-3-git-send-email-hmh@hmh.eng.br> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1260921073-7686-1-git-send-email-hmh@hmh.eng.br> References: <1260921073-7686-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 3daf349..05714ab 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -1264,6 +1264,7 @@ static int __init tpacpi_new_rfkill(const enum tpacpi_rfk_id id, struct tpacpi_rfk *atp_rfk; int res; bool sw_state = false; + bool hw_state; int sw_status; BUG_ON(id >= TPACPI_RFK_SW_MAX || tpacpi_rfkill_switches[id]); @@ -1298,7 +1299,8 @@ static int __init tpacpi_new_rfkill(const enum tpacpi_rfk_id id, rfkill_init_sw_state(atp_rfk->rfkill, sw_state); } } - rfkill_set_hw_state(atp_rfk->rfkill, tpacpi_rfk_check_hwblock_state()); + hw_state = tpacpi_rfk_check_hwblock_state(); + rfkill_set_hw_state(atp_rfk->rfkill, hw_state); res = rfkill_register(atp_rfk->rfkill); if (res < 0) { @@ -1311,6 +1313,9 @@ static int __init tpacpi_new_rfkill(const enum tpacpi_rfk_id id, } tpacpi_rfkill_switches[id] = atp_rfk; + + printk(TPACPI_INFO "rfkill switch %s: radio is %sblocked\n", + name, (sw_state || hw_state) ? "" : "un"); return 0; }