diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-12-05 13:51:18 -0700 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-12-07 11:16:30 -0700 |
commit | 231afea189c6363f2921042576da74e1fb0f2fc3 (patch) | |
tree | d7ecc7c0c9ca63d2acaaf5113c32930d01ad944d /drivers/pci | |
parent | 7793eeabc89fd342b96fdadce5a50c46ab77f3f9 (diff) | |
download | linux-stable-231afea189c6363f2921042576da74e1fb0f2fc3.tar.gz linux-stable-231afea189c6363f2921042576da74e1fb0f2fc3.tar.bz2 linux-stable-231afea189c6363f2921042576da74e1fb0f2fc3.zip |
PCI: Use standard PCIe Capability Link register field names
Use the standard #defines for PCIe Link Status and Capability registers
rather than bare numbers.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/probe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 81d06676ce34..7ec6973378fe 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -521,7 +521,7 @@ static unsigned char pcie_link_speed[] = { void pcie_update_link_speed(struct pci_bus *bus, u16 linksta) { - bus->cur_bus_speed = pcie_link_speed[linksta & 0xf]; + bus->cur_bus_speed = pcie_link_speed[linksta & PCI_EXP_LNKSTA_CLS]; } EXPORT_SYMBOL_GPL(pcie_update_link_speed); @@ -610,7 +610,7 @@ static void pci_set_bus_speed(struct pci_bus *bus) u16 linksta; pcie_capability_read_dword(bridge, PCI_EXP_LNKCAP, &linkcap); - bus->max_bus_speed = pcie_link_speed[linkcap & 0xf]; + bus->max_bus_speed = pcie_link_speed[linkcap & PCI_EXP_LNKCAP_SLS]; pcie_capability_read_word(bridge, PCI_EXP_LNKSTA, &linksta); pcie_update_link_speed(bus, linksta); |