summaryrefslogtreecommitdiffstats
path: root/src/device/pci_device.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2021-03-11 20:34:05 +0100
committerNico Huber <nico.h@gmx.de>2021-03-14 19:27:18 +0000
commit24837e75cb30cc6d8fbd86e5371f850699534975 (patch)
tree1889e8a097ab06d06de4d3b48e7e35d52348cb5f /src/device/pci_device.c
parent095bdecab3ea0e238071ce01b3ce0fcf4ccb2d9c (diff)
downloadcoreboot-24837e75cb30cc6d8fbd86e5371f850699534975.tar.gz
coreboot-24837e75cb30cc6d8fbd86e5371f850699534975.tar.bz2
coreboot-24837e75cb30cc6d8fbd86e5371f850699534975.zip
device/pciexp_device.c: Remove CPP guarding
Let the linker do its job. This fixes building with !CONFIG_PCIEXP_HOTPLUG on some platforms. Change-Id: I46560722dcb5f1d902709e40b714ef092515b164 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51417 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/device/pci_device.c')
-rw-r--r--src/device/pci_device.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index 161715fadd62..d18b2f110be5 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -882,14 +882,15 @@ static struct device_operations *get_pci_bridge_ops(struct device *dev)
case PCI_EXP_TYPE_DOWNSTREAM:
printk(BIOS_DEBUG, "%s subordinate bus PCI Express\n",
dev_path(dev));
-#if CONFIG(PCIEXP_HOTPLUG)
- u16 sltcap;
- sltcap = pci_read_config16(dev, pciexpos + PCI_EXP_SLTCAP);
- if (sltcap & PCI_EXP_SLTCAP_HPC) {
- printk(BIOS_DEBUG, "%s hot-plug capable\n", dev_path(dev));
- return &default_pciexp_hotplug_ops_bus;
+ if (CONFIG(PCIEXP_HOTPLUG)) {
+ u16 sltcap;
+ sltcap = pci_read_config16(dev, pciexpos + PCI_EXP_SLTCAP);
+ if (sltcap & PCI_EXP_SLTCAP_HPC) {
+ printk(BIOS_DEBUG, "%s hot-plug capable\n",
+ dev_path(dev));
+ return &default_pciexp_hotplug_ops_bus;
+ }
}
-#endif /* CONFIG(PCIEXP_HOTPLUG) */
return &default_pciexp_ops_bus;
case PCI_EXP_TYPE_PCI_BRIDGE:
printk(BIOS_DEBUG, "%s subordinate PCI\n",