Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33e8b34f authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

PCI/portdrv: Use PCI Express Capability accessors



Use PCI Express Capability access functions to simplify portdrv.

Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 231afea1
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;