Commit 04de975e authored by Yinghai Lu's avatar Yinghai Lu Committed by Bjorn Helgaas

PCI: cpqhp: use generic pci_hp_add_bridge()

Use the new generic pci_hp_add_bridge() interface.

[bhelgaas: changelog]
Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 7d01f70a
...@@ -83,7 +83,6 @@ static void __iomem *detect_HRT_floating_pointer(void __iomem *begin, void __iom ...@@ -83,7 +83,6 @@ static void __iomem *detect_HRT_floating_pointer(void __iomem *begin, void __iom
int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func) int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func)
{ {
unsigned char bus;
struct pci_bus *child; struct pci_bus *child;
int num; int num;
...@@ -106,11 +105,10 @@ int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func) ...@@ -106,11 +105,10 @@ int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func)
} }
if (func->pci_dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) { if (func->pci_dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
int max; pci_hp_add_bridge(func->pci_dev);
pci_read_config_byte(func->pci_dev, PCI_SECONDARY_BUS, &bus); child = func->pci_dev->subordinate;
child = (struct pci_bus*) pci_add_new_bus(func->pci_dev->bus, (func->pci_dev), bus); if (child)
max = pci_do_scan_bus(child); pci_bus_add_devices(child);
pci_bus_update_busn_res_end(child, max);
} }
pci_dev_put(func->pci_dev); pci_dev_put(func->pci_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment