summaryrefslogtreecommitdiffstats
path: root/drivers/pci/access.c
diff options
context:
space:
mode:
authorMyron Stowe <myron.stowe@redhat.com>2013-01-26 01:55:45 +0100
committerBjorn Helgaas <bhelgaas@google.com>2013-01-31 05:24:39 +0100
commit1c531d82ee1a220ae7132ba0eb31edaf186b56d1 (patch)
tree67736581bd5f36192ef9f2f27a1c28ec9b61e330 /drivers/pci/access.c
parentPCI: Introduce accessor to retrieve PCIe Capabilities Register (diff)
downloadlinux-1c531d82ee1a220ae7132ba0eb31edaf186b56d1.tar.xz
linux-1c531d82ee1a220ae7132ba0eb31edaf186b56d1.zip
PCI: Use PCI Express Capability accessor
Use PCI Express Capability access functions to simplify device Capabilities Register usages. Signed-off-by: Myron Stowe <myron.stowe@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/access.c')
-rw-r--r--drivers/pci/access.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/access.c b/drivers/pci/access.c
index 3af0478c057b..5278ac692cbf 100644
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -472,7 +472,7 @@ EXPORT_SYMBOL_GPL(pci_cfg_access_unlock);
static inline int pcie_cap_version(const struct pci_dev *dev)
{
- return dev->pcie_flags_reg & PCI_EXP_FLAGS_VERS;
+ return pcie_caps_reg(dev) & PCI_EXP_FLAGS_VERS;
}
static inline bool pcie_cap_has_devctl(const struct pci_dev *dev)
@@ -497,7 +497,7 @@ static inline bool pcie_cap_has_sltctl(const struct pci_dev *dev)
return pcie_cap_version(dev) > 1 ||
type == PCI_EXP_TYPE_ROOT_PORT ||
(type == PCI_EXP_TYPE_DOWNSTREAM &&
- dev->pcie_flags_reg & PCI_EXP_FLAGS_SLOT);
+ pcie_caps_reg(dev) & PCI_EXP_FLAGS_SLOT);
}
static inline bool pcie_cap_has_rtctl(const struct pci_dev *dev)