]> git.sur5r.net Git - u-boot/blobdiff - drivers/pci/pci_compat.c
spi: zynq_[q]spi: Use BIT macro
[u-boot] / drivers / pci / pci_compat.c
index d6938c198f70a79b1d8662209df128c4eaa108af..712c48f28f46220c2e7088282e5a53b2e756d7f9 100644 (file)
@@ -5,7 +5,6 @@
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
-#define DEBUG
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
@@ -31,13 +30,9 @@ PCI_HOSE_OP(write, dword, 32, u32)
 
 pci_dev_t pci_find_devices(struct pci_device_id *ids, int index)
 {
-       struct pci_child_platdata *pplat;
-       struct udevice *bus, *dev;
+       struct udevice *dev;
 
        if (pci_find_device_id(ids, index, &dev))
                return -1;
-       bus = dev->parent;
-       pplat = dev_get_parent_platdata(dev);
-
-       return PCI_ADD_BUS(bus->seq, pplat->devfn);
+       return pci_get_bdf(dev);
 }