summaryrefslogtreecommitdiff
path: root/include/acpi
diff options
context:
space:
mode:
authorSinan Kaya <okaya@kernel.org>2018-12-20 01:46:56 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-12-20 12:19:49 +0300
commit5d32a66541c4683456507481a0944ed2985e75c7 (patch)
tree56eda1da3271a5d0c51e3963e9d868e9f810487c /include/acpi
parentbd23fac3eaaa8bd79c02a2f139f68ac6424a9a7c (diff)
downloadlinux-5d32a66541c4683456507481a0944ed2985e75c7.tar.xz
PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set
We are compiling PCI code today for systems with ACPI and no PCI device present. Remove the useless code and reduce the tight dependency. Signed-off-by: Sinan Kaya <okaya@kernel.org> Acked-by: Bjorn Helgaas <bhelgaas@google.com> # PCI parts Acked-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acpi_drivers.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index 14499757338f..de1804aeaf69 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -88,7 +88,14 @@ int acpi_pci_link_free_irq(acpi_handle handle);
struct pci_bus;
+#ifdef CONFIG_PCI
struct pci_dev *acpi_get_pci_dev(acpi_handle);
+#else
+static inline struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
+{
+ return NULL;
+}
+#endif
/* Arch-defined function to add a bus to the system */