From patchwork Fri Jan 18 16:07:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 2003771 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id D5790DF280 for ; Fri, 18 Jan 2013 16:09:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754680Ab3ARQIT (ORCPT ); Fri, 18 Jan 2013 11:08:19 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:54357 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755191Ab3ARQIR (ORCPT ); Fri, 18 Jan 2013 11:08:17 -0500 Received: by mail-pa0-f54.google.com with SMTP id bi5so2202535pad.27 for ; Fri, 18 Jan 2013 08:08:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=7P5RBnUOOfhbZOWKEYU7cDUiuIRli30Ct0oYKmJKfWk=; b=QiPTtHsDFW9cRAVZ2FtCxkyMG0ldGgQ4E3xirSSnki5P4Z8j2J+GkE+6Ia3Hh/qKPO QKjhcP3IEUoqGUi4j62fq9PTbJX0ZsF4RMHSjZaGHjUy7edUm8ryHOy/2/VtY/0VX/Gi 5ifv9RW6J1Ym8O6WoTIYlExADa4IOi/t7vayY4eqOjMbFbF5axvaxNvcLXhiy1APYWM2 8gJdqUAAGGvJI7HCCcJzMcn63Ki6w6X89smRuSc+1cz7rQKksp94WOgY5D5lw506M5Kq +xIbX0ugCiMLvoeRWF81uhWFO8c0HE6f6/8a/o+xfkGt1MWUx2X0JKiqHu9V62ZR47aL A/CQ== X-Received: by 10.68.228.2 with SMTP id se2mr6738954pbc.93.1358525296923; Fri, 18 Jan 2013 08:08:16 -0800 (PST) Received: from localhost.localdomain ([120.197.109.98]) by mx.google.com with ESMTPS id ux4sm3320742pbc.25.2013.01.18.08.08.13 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jan 2013 08:08:16 -0800 (PST) From: Jiang Liu To: "Rafael J . Wysocki" , Bjorn Helgaas Cc: Jiang Liu , Yinghai Lu , Kenji Kaneshige , Yijing Wang , Jiang Liu , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Greg Kroah-Hartman , ACPI Devel Maling List , Toshi Kani , Myron Stowe Subject: [RFC PATCH v5 4/8] ACPI, PCI: avoid building pci_slot as module Date: Sat, 19 Jan 2013 00:07:42 +0800 Message-Id: <1358525267-14268-5-git-send-email-jiang.liu@huawei.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1358525267-14268-1-git-send-email-jiang.liu@huawei.com> References: <1358525267-14268-1-git-send-email-jiang.liu@huawei.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org As discussed in thread at https://patchwork.kernel.org/patch/1946851/, there's no value in supporting CONFIG_ACPI_PCI_SLOT=m any more. So change Kconfig and code to only support building pci_slot as built-in driver. Signed-off-by: Jiang Liu Acked-by: Rafael J. Wysocki Acked-by: Bjorn Helgaas --- drivers/acpi/Kconfig | 5 +---- drivers/acpi/internal.h | 5 +++++ drivers/acpi/pci_slot.c | 13 +------------ drivers/acpi/scan.c | 1 + 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 0300bf6..7efd0d0 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -299,7 +299,7 @@ config ACPI_DEBUG_FUNC_TRACE is about half of the penalty and is rarely useful. config ACPI_PCI_SLOT - tristate "PCI slot detection driver" + bool "PCI slot detection driver" depends on SYSFS default n help @@ -308,9 +308,6 @@ config ACPI_PCI_SLOT i.e., segment/bus/device/function tuples, with physical slots in the system. If you are unsure, say N. - To compile this driver as a module, choose M here: - the module will be called pci_slot. - config X86_PM_TIMER bool "Power Management Timer Support" if EXPERT depends on X86 diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index e050254..7374cfc 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h @@ -67,6 +67,11 @@ struct acpi_ec { extern struct acpi_ec *first_ec; +#ifdef CONFIG_ACPI_PCI_SLOT +void acpi_pci_slot_init(void); +#else +static inline void acpi_pci_slot_init(void) { } +#endif int acpi_pci_root_init(void); int acpi_ec_init(void); int acpi_ec_ecdt_probe(void); diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c index d22585f..a7d7e77 100644 --- a/drivers/acpi/pci_slot.c +++ b/drivers/acpi/pci_slot.c @@ -330,19 +330,8 @@ static struct dmi_system_id acpi_pci_slot_dmi_table[] __initdata = { {} }; -static int __init -acpi_pci_slot_init(void) +void __init acpi_pci_slot_init(void) { dmi_check_system(acpi_pci_slot_dmi_table); acpi_pci_register_driver(&acpi_pci_slot_driver); - return 0; } - -static void __exit -acpi_pci_slot_exit(void) -{ - acpi_pci_unregister_driver(&acpi_pci_slot_driver); -} - -module_init(acpi_pci_slot_init); -module_exit(acpi_pci_slot_exit); diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index f8a0d0f..cb964ac 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1732,6 +1732,7 @@ int __init acpi_scan_init(void) acpi_power_init(); acpi_pci_root_init(); + acpi_pci_slot_init(); /* * Enumerate devices in the ACPI namespace.