aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2024-02-16 20:09:46 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2024-02-16 20:09:46 +0000
commit66d37dbedfbf2dc94ccf49e6983c3652d5909b91 (patch)
treef02a3c479301446f1188e123d6e211c80793db3e /sys/dev
parent1250c9647959fab955fb8d9046cb41bc749e6855 (diff)
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/pci_host_generic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c
index 386b8411d29a..520462972a66 100644
--- a/sys/dev/pci/pci_host_generic.c
+++ b/sys/dev/pci/pci_host_generic.c
@@ -537,10 +537,14 @@ struct resource *
pci_host_generic_core_alloc_resource(device_t dev, device_t child, int type,
int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags)
{
+#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
struct generic_pcie_core_softc *sc;
+#endif
struct resource *res;
+#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
sc = device_get_softc(dev);
+#endif
switch (type) {
#if defined(NEW_PCIB) && defined(PCI_RES_BUS)