aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorSinan Kaya <okaya@kernel.org>2018-12-19 22:46:54 +0000
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-12-20 10:19:49 +0100
commit86689776878f0c1aee77604b9c5fce2ffb9ec65e (patch)
treed691275b4abdc62e3b0c1958d163f8b8054efb6a /drivers/acpi
parentACPI: Move PCI reset to a separate function (diff)
downloadlinux-dev-86689776878f0c1aee77604b9c5fce2ffb9ec65e.tar.xz
linux-dev-86689776878f0c1aee77604b9c5fce2ffb9ec65e.zip
ACPI: Allow CONFIG_PCI to be unset for reboot
Make PCI reboot conditional on CONFIG_PCI set on the kernel configuration. Signed-off-by: Sinan Kaya <okaya@kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/reboot.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/acpi/reboot.c b/drivers/acpi/reboot.c
index d642a9dede52..ca707f5b521d 100644
--- a/drivers/acpi/reboot.c
+++ b/drivers/acpi/reboot.c
@@ -4,6 +4,7 @@
#include <linux/acpi.h>
#include <acpi/reboot.h>
+#ifdef CONFIG_PCI
static void acpi_pci_reboot(struct acpi_generic_address *rr, u8 reset_value)
{
unsigned int devfn;
@@ -21,6 +22,13 @@ static void acpi_pci_reboot(struct acpi_generic_address *rr, u8 reset_value)
pci_bus_write_config_byte(bus0, devfn,
(rr->address & 0xffff), reset_value);
}
+#else
+static inline void acpi_pci_reboot(struct acpi_generic_address *rr,
+ u8 reset_value)
+{
+ pr_warn_once("PCI configuration space access is not supported\n");
+}
+#endif
void acpi_reboot(void)
{