summaryrefslogtreecommitdiff
path: root/drivers/pci/pcie
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2012-12-05 13:51:18 -0700
committerBjorn Helgaas <bhelgaas@google.com>2012-12-07 11:16:35 -0700
commit33e8b34fdd5640f3aa1597710352349cbc823374 (patch)
treef289be1b2668ffbd114e15ba8848c5413c72eebc /drivers/pci/pcie
parent231afea189c6363f2921042576da74e1fb0f2fc3 (diff)
downloadlinux-3.10-33e8b34fdd5640f3aa1597710352349cbc823374.tar.gz
linux-3.10-33e8b34fdd5640f3aa1597710352349cbc823374.tar.bz2
linux-3.10-33e8b34fdd5640f3aa1597710352349cbc823374.zip
PCI/portdrv: Use PCI Express Capability accessors
Use PCI Express Capability access functions to simplify portdrv. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r--drivers/pci/pcie/portdrv_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index d03a7a39b2d..70d3555903a 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -120,8 +120,7 @@ static int pcie_port_enable_msix(struct pci_dev *dev, int *vectors, int mask)
* the value in this field indicates which MSI-X Table entry is
* used to generate the interrupt message."
*/
- pos = pci_pcie_cap(dev);
- pci_read_config_word(dev, pos + PCI_EXP_FLAGS, &reg16);
+ pcie_capability_read_word(dev, PCI_EXP_FLAGS, &reg16);
entry = (reg16 & PCI_EXP_FLAGS_IRQ) >> 9;
if (entry >= nr_entries)
goto Error;