aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-05-17 21:58:41 -0400
committerBjorn Helgaas <bhelgaas@google.com>2012-06-13 17:42:26 -0400
commit2d7abf32925f1a8aeeb37234c8ea7590ebbe62be (patch)
tree3aa646a78644c50da42a8e4a6c52eb7b1fb70c68 /drivers/pci/hotplug
parent04de975e7840e6d9da3ef44ab414f3ee1b98d611 (diff)
PCI: ibmhp: use generic pci_hp_add_bridge()
Use the new generic pci_hp_add_bridge() interface. [bhelgaas: changelog] Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/ibmphp_core.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
index a62f296e8b0d..7dccad5fc891 100644
--- a/drivers/pci/hotplug/ibmphp_core.c
+++ b/drivers/pci/hotplug/ibmphp_core.c
@@ -775,7 +775,6 @@ static u8 bus_structure_fixup(u8 busno)
775 775
776static int ibm_configure_device(struct pci_func *func) 776static int ibm_configure_device(struct pci_func *func)
777{ 777{
778 unsigned char bus;
779 struct pci_bus *child; 778 struct pci_bus *child;
780 int num; 779 int num;
781 int flag = 0; /* this is to make sure we don't double scan the bus, 780 int flag = 0; /* this is to make sure we don't double scan the bus,
@@ -805,11 +804,10 @@ static int ibm_configure_device(struct pci_func *func)
805 } 804 }
806 } 805 }
807 if (!(flag) && (func->dev->hdr_type == PCI_HEADER_TYPE_BRIDGE)) { 806 if (!(flag) && (func->dev->hdr_type == PCI_HEADER_TYPE_BRIDGE)) {
808 int max; 807 pci_hp_add_bridge(func->dev);
809 pci_read_config_byte(func->dev, PCI_SECONDARY_BUS, &bus); 808 child = func->dev->subordinate;
810 child = pci_add_new_bus(func->dev->bus, func->dev, bus); 809 if (child)
811 max = pci_do_scan_bus(child); 810 pci_bus_add_devices(child);
812 pci_bus_update_busn_res_end(child, max);
813 } 811 }
814 812
815 return 0; 813 return 0;