From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sinan Kaya Subject: [PATCH v6 2/5] ACPI / OSL: Stub out acpi_os_read_pci_configuration when CONFIG_PCI is unset Date: Wed, 12 Dec 2018 17:19:37 +0000 Message-ID: <20181212171941.7437-3-okaya@kernel.org> References: <20181212171941.7437-1-okaya@kernel.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20181212171941.7437-1-okaya@kernel.org> Sender: linux-kernel-owner@vger.kernel.org To: linux-acpi@vger.kernel.org Cc: Sinan Kaya , "Rafael J. Wysocki" , Len Brown , open list List-Id: linux-acpi@vger.kernel.org Getting ready to allow CONFIG_PCI to be disabled with ACPI enabled. Stub out acpi_os_read_pci_configuration function that depend on PCI. Signed-off-by: Sinan Kaya --- drivers/acpi/osl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index b48874b8e1ea..fb92b8a0ad31 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -773,6 +773,7 @@ acpi_status acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg, u64 *value, u32 width) { +#ifdef CONFIG_PCI int result, size; u32 value32; @@ -799,6 +800,12 @@ acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg, *value = value32; return (result ? AE_ERROR : AE_OK); +#else + int rc; + + rc = pr_warn_once("PCI configuration space access is not supported\n"); + return rc ? AE_SUPPORT : AE_OK; +#endif } acpi_status -- 2.19.0