diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2013-08-22 05:24:44 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-08-22 18:47:02 +0200 |
commit | a58674ff8383f5b8f6a77f03c48f6a47840b9325 (patch) | |
tree | b07c7f08dc3bd929131d6dc164d27cf8c0903cff /drivers/pci/probe.c | |
parent | PCI: Drop "PCI-E" prefix from Max Payload Size message (diff) | |
download | linux-a58674ff8383f5b8f6a77f03c48f6a47840b9325.tar.xz linux-a58674ff8383f5b8f6a77f03c48f6a47840b9325.zip |
PCI: Simplify pcie_bus_configure_settings() interface
Based on a patch by Jon Mason (see URL below).
All users of pcie_bus_configure_settings() pass arguments of the form
"bus, bus->self->pcie_mpss". The "mpss" argument is redundant since we
can easily look it up internally. In addition, all callers check
"bus->self" for NULL, which we can also do internally.
This patch simplifies the interface and the callers. No functional change.
Reference: http://lkml.kernel.org/r/1317048850-30728-2-git-send-email-mason@myri.com
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 9a334301a8f4..ecae7f290647 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1607,10 +1607,13 @@ static int pcie_bus_configure_set(struct pci_dev *dev, void *data) * parents then children fashion. If this changes, then this code will not * work as designed. */ -void pcie_bus_configure_settings(struct pci_bus *bus, u8 mpss) +void pcie_bus_configure_settings(struct pci_bus *bus) { u8 smpss; + if (!bus->self) + return; + if (!pci_is_pcie(bus->self)) return; @@ -1625,7 +1628,7 @@ void pcie_bus_configure_settings(struct pci_bus *bus, u8 mpss) smpss = 0; if (pcie_bus_config == PCIE_BUS_SAFE) { - smpss = mpss; + smpss = bus->self->pcie_mpss; pcie_find_smpss(bus->self, &smpss); pci_walk_bus(bus, pcie_find_smpss, &smpss); |