diff options
author | Yijing Wang <wangyijing@huawei.com> | 2014-05-04 08:23:38 +0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-05-28 00:53:41 +0400 |
commit | 6788a51fe3391817c8ded5f43dd4c57f3d212c17 (patch) | |
tree | 499f69d27cb71ccdd3127cc030e2bf96e1fcbe02 /drivers/pci/pci-acpi.c | |
parent | 1c86438c9423a26cc9f7f74a8950d9cf9c93bc23 (diff) | |
download | linux-6788a51fe3391817c8ded5f43dd4c57f3d212c17.tar.xz |
PCI: Use pci_is_bridge() to simplify code
Use pci_is_bridge() to simplify code. No functional change.
Requires: 326c1cdae741 PCI: Rename pci_is_bridge() to pci_has_subordinate()
Requires: 1c86438c9423 PCI: Add new pci_is_bridge() interface
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci-acpi.c')
-rw-r--r-- | drivers/pci/pci-acpi.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index f49abef88485..ca4927ba8433 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c @@ -309,13 +309,7 @@ static struct acpi_device *acpi_pci_find_companion(struct device *dev) bool check_children; u64 addr; - /* - * pci_is_bridge() is not suitable here, because pci_dev->subordinate - * is set only after acpi_pci_find_device() has been called for the - * given device. - */ - check_children = pci_dev->hdr_type == PCI_HEADER_TYPE_BRIDGE - || pci_dev->hdr_type == PCI_HEADER_TYPE_CARDBUS; + check_children = pci_is_bridge(pci_dev); /* Please ref to ACPI spec for the syntax of _ADR */ addr = (PCI_SLOT(pci_dev->devfn) << 16) | PCI_FUNC(pci_dev->devfn); return acpi_find_child_device(ACPI_COMPANION(dev->parent), addr, |