diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2018-03-19 19:06:34 +0100 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-03-19 19:06:34 +0100 |
commit | f9ea894ca59a7abd931e52700bbe12e87e891c1e (patch) | |
tree | d5e19b92840d5d04d59e7bf4b43196fa1b8511d0 /drivers/pci/vpd.c | |
parent | PCI/VPD: Move VPD quirks to vpd.c (diff) | |
download | linux-f9ea894ca59a7abd931e52700bbe12e87e891c1e.tar.xz linux-f9ea894ca59a7abd931e52700bbe12e87e891c1e.zip |
PCI/VPD: Move VPD structures to vpd.c
The VPD-related structures are only used in vpd.c, so move them from
drivers/pci/pci.h to vpd.c. No functional change intended.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/vpd.c')
-rw-r--r-- | drivers/pci/vpd.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c index 901b0bedcc5d..f24c3600be73 100644 --- a/drivers/pci/vpd.c +++ b/drivers/pci/vpd.c @@ -14,6 +14,23 @@ /* VPD access through PCI 2.2+ VPD capability */ +struct pci_vpd_ops { + ssize_t (*read)(struct pci_dev *dev, loff_t pos, size_t count, void *buf); + ssize_t (*write)(struct pci_dev *dev, loff_t pos, size_t count, const void *buf); + int (*set_size)(struct pci_dev *dev, size_t len); +}; + +struct pci_vpd { + const struct pci_vpd_ops *ops; + struct bin_attribute *attr; /* Descriptor for sysfs VPD entry */ + struct mutex lock; + unsigned int len; + u16 flag; + u8 cap; + unsigned int busy:1; + unsigned int valid:1; +}; + /** * pci_read_vpd - Read one entry from Vital Product Data * @dev: pci device struct |