summaryrefslogtreecommitdiff
path: root/src/device/device_const.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/device_const.c')
-rw-r--r--src/device/device_const.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/device/device_const.c b/src/device/device_const.c
index c91c00908d..0521c7e8a4 100644
--- a/src/device/device_const.c
+++ b/src/device/device_const.c
@@ -34,8 +34,8 @@ static DEVTREE_CONST struct device *dev_find_slot(unsigned int bus,
result = 0;
for (dev = all_devices; dev; dev = dev->next) {
if ((dev->path.type == DEVICE_PATH_PCI) &&
- (dev->bus->secondary == bus) &&
- (dev->bus->segment_group == 0) &&
+ (dev->upstream->secondary == bus) &&
+ (dev->upstream->segment_group == 0) &&
(dev->path.pci.devfn == devfn)) {
result = dev;
break;
@@ -210,7 +210,7 @@ DEVTREE_CONST struct device *find_dev_nested_path(
if (nested_path_length == 1 || !child)
return child;
- return find_dev_nested_path(child->link_list, nested_path + 1, nested_path_length - 1);
+ return find_dev_nested_path(child->downstream, nested_path + 1, nested_path_length - 1);
}
DEVTREE_CONST struct device *pcidev_path_behind(
@@ -234,8 +234,8 @@ DEVTREE_CONST struct device *pcidev_path_on_bus(unsigned int bus, pci_devfn_t de
dev = dev->next;
continue;
}
- if (dev->bus->secondary == bus && dev->bus->segment_group == 0)
- return pcidev_path_behind(dev->bus, devfn);
+ if (dev->upstream->secondary == bus && dev->upstream->segment_group == 0)
+ return pcidev_path_behind(dev->upstream, devfn);
dev = dev->next;
}
return NULL;
@@ -253,7 +253,7 @@ DEVTREE_CONST struct bus *pci_root_bus(void)
if (!pci_domain)
return NULL;
- pci_root = pci_domain->link_list;
+ pci_root = pci_domain->downstream;
return pci_root;
}
@@ -277,7 +277,7 @@ DEVTREE_CONST struct device *pcidev_path_behind_pci2pci_bridge(
return NULL;
}
- return pcidev_path_behind(bridge->link_list, devfn);
+ return pcidev_path_behind(bridge->downstream, devfn);
}
DEVTREE_CONST struct device *pcidev_path_on_root_debug(pci_devfn_t devfn, const char *func)
@@ -317,7 +317,7 @@ DEVTREE_CONST struct device *dev_find_slot_on_smbus(unsigned int bus,
result = 0;
for (dev = all_devices; dev; dev = dev->next) {
if ((dev->path.type == DEVICE_PATH_I2C) &&
- (dev->bus->secondary == bus) &&
+ (dev->upstream->secondary == bus) &&
(dev->path.i2c.device == addr)) {
result = dev;
break;