From patchwork Fri Jun 19 12:52:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Chary X-Patchwork-Id: 31337 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 n5JCslIw015214 for ; Fri, 19 Jun 2009 12:54:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754645AbZFSMys (ORCPT ); Fri, 19 Jun 2009 08:54:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753128AbZFSMys (ORCPT ); Fri, 19 Jun 2009 08:54:48 -0400 Received: from smtp21.orange.fr ([80.12.242.49]:23100 "EHLO smtp21.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754811AbZFSMyn (ORCPT ); Fri, 19 Jun 2009 08:54:43 -0400 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2121.orange.fr (SMTP Server) with ESMTP id AF37B1C000AE; Fri, 19 Jun 2009 14:54:45 +0200 (CEST) Received: from localhost.localdomain (ALyon-253-1-96-48.w86-206.abo.wanadoo.fr [86.206.191.48]) by mwinf2121.orange.fr (SMTP Server) with ESMTP id 3C33C1C000AA; Fri, 19 Jun 2009 14:54:45 +0200 (CEST) X-ME-UUID: 20090619125445246.3C33C1C000AA@mwinf2121.orange.fr From: Corentin Chary To: lenb@kernel.org Cc: linux-acpi@vger.kernel.org, Corentin Chary , Janne Grunau Subject: [PATCH 8/9] eeepc-laptop: add rfkill support for the 3G modem in Eee PC 901 Go Date: Fri, 19 Jun 2009 14:52:10 +0200 Message-Id: <1245415931-26466-8-git-send-email-corentincj@iksaif.net> X-Mailer: git-send-email 1.6.3.1 In-Reply-To: <1245415931-26466-7-git-send-email-corentincj@iksaif.net> References: <1245415931-26466-1-git-send-email-corentincj@iksaif.net> <1245415931-26466-2-git-send-email-corentincj@iksaif.net> <1245415931-26466-3-git-send-email-corentincj@iksaif.net> <1245415931-26466-4-git-send-email-corentincj@iksaif.net> <1245415931-26466-5-git-send-email-corentincj@iksaif.net> <1245415931-26466-6-git-send-email-corentincj@iksaif.net> <1245415931-26466-7-git-send-email-corentincj@iksaif.net> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Signed-off-by: Janne Grunau Signed-off-by: Corentin Chary --- drivers/platform/x86/eeepc-laptop.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 4d55c17..67ad360 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c @@ -141,6 +141,7 @@ struct eeepc_hotk { u16 *keycode_map; struct rfkill *wlan_rfkill; struct rfkill *bluetooth_rfkill; + struct rfkill *wwan3g_rfkill; struct hotplug_slot *hotplug_slot; }; @@ -990,6 +991,8 @@ static void eeepc_rfkill_exit(void) rfkill_unregister(ehotk->wlan_rfkill); if (ehotk->bluetooth_rfkill) rfkill_unregister(ehotk->bluetooth_rfkill); + if (ehotk->wwan3g_rfkill) + rfkill_unregister(ehotk->wwan3g_rfkill); if (ehotk->hotplug_slot) pci_hp_deregister(ehotk->hotplug_slot); } @@ -1074,6 +1077,13 @@ static int eeepc_rfkill_init(struct device *dev) if (result && result != -ENODEV) goto exit; + result = eeepc_new_rfkill(&ehotk->wwan3g_rfkill, + "eeepc-wwan3g", dev, + RFKILL_TYPE_WWAN, CM_ASL_3G); + + if (result && result != -ENODEV) + goto exit; + result = eeepc_setup_pci_hotplug(); /* * If we get -EBUSY then something else is handling the PCI hotplug -