dm: pci: Move pci_bus_to_hose() to compatibility

This function should not be used by driver-model code, so move it to the
compatibility portion.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Simon Glass
2016-01-18 20:19:14 -07:00
committed by Bin Meng
parent 12f229ea8f
commit a6eb93b321
3 changed files with 28 additions and 15 deletions

View File

@@ -22,7 +22,7 @@
DECLARE_GLOBAL_DATA_PTR;
static int pci_get_bus(int busnum, struct udevice **busp)
int pci_get_bus(int busnum, struct udevice **busp)
{
int ret;
@@ -41,20 +41,6 @@ static int pci_get_bus(int busnum, struct udevice **busp)
return ret;
}
struct pci_controller *pci_bus_to_hose(int busnum)
{
struct udevice *bus;
int ret;
ret = pci_get_bus(busnum, &bus);
if (ret) {
debug("%s: Cannot get bus %d: ret=%d\n", __func__, busnum, ret);
return NULL;
}
return dev_get_uclass_priv(bus);
}
struct udevice *pci_get_controller(struct udevice *dev)
{
while (device_is_on_pci_bus(dev))