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

Commit 7c9c003c authored by Myron Stowe's avatar Myron Stowe Committed by Bjorn Helgaas
Browse files

PCI: Introduce accessor to retrieve PCIe Capabilities Register



Provide an accessor to retrieve the PCI Express device's Capabilities
Register.

Signed-off-by: default avatarMyron Stowe <myron.stowe@redhat.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 10c463a7
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1692,6 +1692,15 @@ static inline bool pci_is_pcie(struct pci_dev *dev)
	return !!pci_pcie_cap(dev);
}

/**
 * pcie_caps_reg - get the PCIe Capabilities Register
 * @dev: PCI device
 */
static inline u16 pcie_caps_reg(const struct pci_dev *dev)
{
	return dev->pcie_flags_reg;
}

/**
 * pci_pcie_type - get the PCIe device/port type
 * @dev: PCI device