Skip to content

Commit

Permalink
powerpc/PCI: Use pci_is_bridge() to simplify code
Browse files Browse the repository at this point in the history
Use pci_is_bridge() to simplify code.  No functional change.

Requires: 326c1cd PCI: Rename pci_is_bridge() to pci_has_subordinate()
Requires: 1c86438 PCI: Add new pci_is_bridge() interface
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
Yijing Wang authored and Bjorn Helgaas committed May 27, 2014
1 parent 11a3bd0 commit c888770
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions arch/powerpc/kernel/pci-hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ void pcibios_add_pci_devices(struct pci_bus * bus)
max = bus->busn_res.start;
for (pass = 0; pass < 2; pass++) {
list_for_each_entry(dev, &bus->devices, bus_list) {
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
if (pci_is_bridge(dev))
max = pci_scan_bridge(bus, dev,
max, pass);
}
Expand Down
3 changes: 1 addition & 2 deletions arch/powerpc/kernel/pci_of_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,7 @@ static void __of_scan_bus(struct device_node *node, struct pci_bus *bus,

/* Now scan child busses */
list_for_each_entry(dev, &bus->devices, bus_list) {
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) {
if (pci_is_bridge(dev)) {
of_scan_pci_bridge(dev);
}
}
Expand Down

0 comments on commit c888770

Please sign in to comment.