summaryrefslogtreecommitdiff
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2021-08-08 19:21:56 +0200
committerBjorn Helgaas <bhelgaas@google.com>2021-08-12 12:48:42 -0500
commitfd00faa375fbb9d46ae0730d0faf4a3006301005 (patch)
treee88842d70b8d6bc30b43104772397ca3b392173c /include/linux/pci.h
parent22ff2bcec704a7a8c43a998251e0757cd2de66e1 (diff)
PCI/VPD: Embed struct pci_vpd in struct pci_dev
Now that struct pci_vpd is really small, simplify the code by embedding struct pci_vpd directly in struct pci_dev instead of dynamically allocating it. Link: https://lore.kernel.org/r/d898489e-22ba-71f1-2f31-f1a78dc15849@gmail.com Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 540b377ca8f6..e752cc39a1fe 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -300,9 +300,14 @@ struct pci_cap_saved_state {
struct pci_cap_saved_data cap;
};
+struct pci_vpd {
+ struct mutex lock;
+ unsigned int len;
+ u8 cap;
+};
+
struct irq_affinity;
struct pcie_link_state;
-struct pci_vpd;
struct pci_sriov;
struct pci_p2pdma;
struct rcec_ea;
@@ -473,7 +478,7 @@ struct pci_dev {
#ifdef CONFIG_PCI_MSI
const struct attribute_group **msi_irq_groups;
#endif
- struct pci_vpd *vpd;
+ struct pci_vpd vpd;
#ifdef CONFIG_PCIE_DPC
u16 dpc_cap;
unsigned int dpc_rp_extensions:1;