aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-08-21 23:24:46 -0400
committerBjorn Helgaas <bhelgaas@google.com>2013-08-22 12:47:04 -0400
commitc2996948ac36a9082f27b9ad94dac4c821a9c33d (patch)
treeda7eacb8af784ca903787e01dd2ed4700c70654c /drivers/pci
parentf67577118d1154154cf3c1d96f870c4da13846b4 (diff)
PCI: Simplify MPS test for Downstream Port
PCIe hotplug bridges are always either Root Ports or Downstream Ports. No other device type can have a PCIe link leading downstream to a slot. Root Ports don't have an upstream bridge, so "dev->is_hotplug_bridge && dev->bus->self" is true if and only if "dev" is a Downstream Port. That means we can simplify this by looking at the type of "dev" itself, without looking upstream at all. No functional change. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/probe.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index ecae7f290647..0591b087a6c3 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1507,8 +1507,7 @@ static int pcie_find_smpss(struct pci_dev *dev, void *data)
1507 * will occur as normal. 1507 * will occur as normal.
1508 */ 1508 */
1509 if (dev->is_hotplug_bridge && (!list_is_singular(&dev->bus->devices) || 1509 if (dev->is_hotplug_bridge && (!list_is_singular(&dev->bus->devices) ||
1510 (dev->bus->self && 1510 pci_pcie_type(dev) != PCI_EXP_TYPE_ROOT_PORT))
1511 pci_pcie_type(dev->bus->self) != PCI_EXP_TYPE_ROOT_PORT)))
1512 *smpss = 0; 1511 *smpss = 0;
1513 1512
1514 if (*smpss > dev->pcie_mpss) 1513 if (*smpss > dev->pcie_mpss)