summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2015-07-19 00:20:05 +0800
committerSimon Glass <sjg@chromium.org>2015-07-28 10:36:23 -0600
commit8326f136da6dc496648b8aa75d9717e2e31adad0 (patch)
tree77e20d2fdad73ff58f491e98a8cd624d4047fce3 /drivers/pci
parent4d8615cbf552843c6033daabf3495a1b7fc9dce7 (diff)
downloadu-boot-imx-8326f136da6dc496648b8aa75d9717e2e31adad0.zip
u-boot-imx-8326f136da6dc496648b8aa75d9717e2e31adad0.tar.gz
u-boot-imx-8326f136da6dc496648b8aa75d9717e2e31adad0.tar.bz2
dm: pci: Pass only device/function to pci_bus_find_devfn()
In dm_pci_hose_probe_bus(), pci_bus_find_devfn() is called with a bdf which includes a bus number, but it really should not as this routine only expects a device/function encoding. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci-uclass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 6d0696a..bc0be1e 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -326,7 +326,7 @@ int dm_pci_hose_probe_bus(struct pci_controller *hose, pci_dev_t bdf)
parent = hose->bus;
/* Find the bus within the parent */
- ret = pci_bus_find_devfn(parent, bdf, &bus);
+ ret = pci_bus_find_devfn(parent, PCI_MASK_BUS(bdf), &bus);
if (ret) {
debug("%s: Cannot find device %x on bus %s: %d\n", __func__,
bdf, parent->name, ret);