diff options
author | Minghuan Lian <Minghuan.Lian@nxp.com> | 2016-12-13 14:54:09 +0800 |
---|---|---|
committer | York Sun <york.sun@nxp.com> | 2017-01-18 09:25:14 -0800 |
commit | d7482ca4265fbe4065b28ace998636f78406ed95 (patch) | |
tree | 2a9478fcb2202799f60d80ee1c1cb9ebe09777ec /drivers/pci | |
parent | 1e960e15a58d029fbf7ad2a58afc565275d3485e (diff) |
dm: pci: return the real controller in pci_bus_to_hose()
for the legacy PCI driver, the function pci_bus_to_hose() returns
the real PCIe controller. To keep consistency, this function is
changed to return the PCIe controller pointer of the root bus
instead of the current PCIe bus.
Signed-off-by: Minghuan Lian <Minghuan.Lian@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci_compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci_compat.c b/drivers/pci/pci_compat.c index ddaf358e26..25bc095dce 100644 --- a/drivers/pci/pci_compat.c +++ b/drivers/pci/pci_compat.c @@ -49,5 +49,5 @@ struct pci_controller *pci_bus_to_hose(int busnum) return NULL; } - return dev_get_uclass_priv(bus); + return dev_get_uclass_priv(pci_get_controller(bus)); } |