From patchwork Wed Dec 5 20:57:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [03/12] PCI/portdrv: Use PCI Express Capability accessors Date: Wed, 05 Dec 2012 10:57:35 -0000 From: Bjorn Helgaas X-Patchwork-Id: 203948 Message-Id: <20121205205735.13851.23975.stgit@bhelgaas.mtv.corp.google.com> To: linux-pci@vger.kernel.org Cc: Jiang Liu Use PCI Express Capability access functions to simplify portdrv. Signed-off-by: Bjorn Helgaas CC: Jiang Liu --- drivers/pci/pcie/portdrv_core.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index d03a7a3..70d3555 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, ®16); + pcie_capability_read_word(dev, PCI_EXP_FLAGS, ®16); entry = (reg16 & PCI_EXP_FLAGS_IRQ) >> 9; if (entry >= nr_entries) goto Error;