From patchwork Tue Mar 24 22:49:48 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 14136 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 n2OMoZls007965 for ; Tue, 24 Mar 2009 22:50:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753601AbZCXWtv (ORCPT ); Tue, 24 Mar 2009 18:49:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754532AbZCXWtv (ORCPT ); Tue, 24 Mar 2009 18:49:51 -0400 Received: from g4t0017.houston.hp.com ([15.201.24.20]:41611 "EHLO g4t0017.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753601AbZCXWtv (ORCPT ); Tue, 24 Mar 2009 18:49:51 -0400 Received: from smtp2.fc.hp.com (smtp.fc.hp.com [15.11.136.114]) by g4t0017.houston.hp.com (Postfix) with ESMTP id 74AFA3817A; Tue, 24 Mar 2009 22:49:49 +0000 (UTC) Received: from localhost.localdomain (lart.fc.hp.com [15.11.146.31]) by smtp2.fc.hp.com (Postfix) with ESMTP id 908642BD52D; Tue, 24 Mar 2009 22:26:04 +0000 (UTC) Received: from bob.kio (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id B3D2F2614B; Tue, 24 Mar 2009 16:49:48 -0600 (MDT) From: Bjorn Helgaas Subject: [PATCH 03/10] ACPI: call acpi_ec_init() explicitly rather than as initcall To: Len Brown Cc: linux-acpi@vger.kernel.org, Li Shaohua , Alexey Starikovskiy , Li Shaohua , Zhao Yakui Date: Tue, 24 Mar 2009 16:49:48 -0600 Message-ID: <20090324224948.1262.17270.stgit@bob.kio> In-Reply-To: <20090324224834.1262.65260.stgit@bob.kio> References: <20090324224834.1262.65260.stgit@bob.kio> User-Agent: StGIT/0.14.3.215.gff3d MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org This patch makes acpi_init() call acpi_ec_init() directly. Previously, both were subsys_initcalls. acpi_ec_init() must happen after acpi_init(), and it's better to call it explicitly rather than rely on link ordering. Signed-off-by: Bjorn Helgaas CC: Alexey Starikovskiy --- drivers/acpi/bus.c | 1 + drivers/acpi/ec.c | 7 +------ drivers/acpi/internal.h | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index cdd11fd..9ca6837 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -880,6 +880,7 @@ static int __init acpi_init(void) dmi_check_system(power_nocheck_dmi_table); acpi_scan_init(); + acpi_ec_init(); return result; } diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 2fe1506..bf88f18 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1069,13 +1069,10 @@ static struct acpi_driver acpi_ec_driver = { }, }; -static int __init acpi_ec_init(void) +int __init acpi_ec_init(void) { int result = 0; - if (acpi_disabled) - return 0; - acpi_ec_dir = proc_mkdir(ACPI_EC_CLASS, acpi_root_dir); if (!acpi_ec_dir) return -ENODEV; @@ -1090,8 +1087,6 @@ static int __init acpi_ec_init(void) return result; } -subsys_initcall(acpi_ec_init); - /* EC driver currently not unloadable */ #if 0 static void __exit acpi_ec_exit(void) diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index 28042c0..fad8e38 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h @@ -17,6 +17,7 @@ extern int acpi_power_nocheck; /* -------------------------------------------------------------------------- Embedded Controller -------------------------------------------------------------------------- */ +int acpi_ec_init(void); int acpi_ec_ecdt_probe(void); int acpi_boot_ec_enable(void);