PCI: Introduce accessor to retrieve PCIe Capabilities Register

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

Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 15472d6..78581e1 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1693,6 +1693,15 @@
 }
 
 /**
+ * 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
  */