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>
This commit is contained in:
Heiner Kallweit
2021-08-08 19:21:56 +02:00
committed by Bjorn Helgaas
parent 22ff2bcec7
commit fd00faa375
3 changed files with 21 additions and 52 deletions

View File

@@ -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;