Skip to content

Commit 8668977

Browse files
Sinan Kayarafaeljw
authored andcommitted
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>
1 parent 36ad7d2 commit 8668977

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎drivers/acpi/reboot.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <linux/acpi.h>
55
#include <acpi/reboot.h>
66

7+
#ifdef CONFIG_PCI
78
static void acpi_pci_reboot(struct acpi_generic_address *rr, u8 reset_value)
89
{
910
unsigned int devfn;
@@ -21,6 +22,13 @@ static void acpi_pci_reboot(struct acpi_generic_address *rr, u8 reset_value)
2122
pci_bus_write_config_byte(bus0, devfn,
2223
(rr->address & 0xffff), reset_value);
2324
}
25+
#else
26+
static inline void acpi_pci_reboot(struct acpi_generic_address *rr,
27+
u8 reset_value)
28+
{
29+
pr_warn_once("PCI configuration space access is not supported\n");
30+
}
31+
#endif
2432

2533
void acpi_reboot(void)
2634
{

0 commit comments

Comments
 (0)