Skip to content

Commit

Permalink
PCI: acpiphp: 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 5cbe5d1 commit c7a071f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/pci/hotplug/acpiphp_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,7 @@ static void __ref enable_slot(struct acpiphp_slot *slot)
if (PCI_SLOT(dev->devfn) != slot->device)
continue;

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);
if (pass && dev->subordinate) {
check_hotplug_bridge(slot, dev);
Expand Down

0 comments on commit c7a071f

Please sign in to comment.