diff options
author | Yinghai Lu <yinghai@kernel.org> | 2012-05-17 21:58:41 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-06-13 17:42:26 -0400 |
commit | 04de975e7840e6d9da3ef44ab414f3ee1b98d611 (patch) | |
tree | 299b24c606ff8cac96f9f79a4b535f159b736f64 /drivers/pci | |
parent | 7d01f70ac6f48733d595f1a54aa7c4d2ae3fef0d (diff) |
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>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/cpqphp_pci.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c index 24716725263f..09801c6945ce 100644 --- a/drivers/pci/hotplug/cpqphp_pci.c +++ b/drivers/pci/hotplug/cpqphp_pci.c | |||
@@ -83,7 +83,6 @@ static void __iomem *detect_HRT_floating_pointer(void __iomem *begin, void __iom | |||
83 | 83 | ||
84 | int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func) | 84 | int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func) |
85 | { | 85 | { |
86 | unsigned char bus; | ||
87 | struct pci_bus *child; | 86 | struct pci_bus *child; |
88 | int num; | 87 | int num; |
89 | 88 | ||
@@ -106,11 +105,10 @@ int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func) | |||
106 | } | 105 | } |
107 | 106 | ||
108 | if (func->pci_dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) { | 107 | if (func->pci_dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) { |
109 | int max; | 108 | pci_hp_add_bridge(func->pci_dev); |
110 | pci_read_config_byte(func->pci_dev, PCI_SECONDARY_BUS, &bus); | 109 | child = func->pci_dev->subordinate; |
111 | child = (struct pci_bus*) pci_add_new_bus(func->pci_dev->bus, (func->pci_dev), bus); | 110 | if (child) |
112 | max = pci_do_scan_bus(child); | 111 | pci_bus_add_devices(child); |
113 | pci_bus_update_busn_res_end(child, max); | ||
114 | } | 112 | } |
115 | 113 | ||
116 | pci_dev_put(func->pci_dev); | 114 | pci_dev_put(func->pci_dev); |