Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: cpqhp: 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>

authored by

Yinghai Lu and committed by
Bjorn Helgaas
04de975e 7d01f70a

+4 -6
+4 -6
drivers/pci/hotplug/cpqphp_pci.c
··· 83 83 84 84 int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func) 85 85 { 86 - unsigned char bus; 87 86 struct pci_bus *child; 88 87 int num; 89 88 ··· 105 106 } 106 107 107 108 if (func->pci_dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) { 108 - int max; 109 - pci_read_config_byte(func->pci_dev, PCI_SECONDARY_BUS, &bus); 110 - child = (struct pci_bus*) pci_add_new_bus(func->pci_dev->bus, (func->pci_dev), bus); 111 - max = pci_do_scan_bus(child); 112 - pci_bus_update_busn_res_end(child, max); 109 + pci_hp_add_bridge(func->pci_dev); 110 + child = func->pci_dev->subordinate; 111 + if (child) 112 + pci_bus_add_devices(child); 113 113 } 114 114 115 115 pci_dev_put(func->pci_dev);