aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2021-08-26 20:55:43 +0200
committerBjorn Helgaas <bhelgaas@google.com>2021-08-31 16:08:15 -0500
commitacfbb1b8a494d7bfd316dfb363a820e6df637e8d (patch)
tree3e0cadbca3067d42af92ecb1f6f012a3a2d5b60f /drivers/pci
parentPCI/VPD: Include post-processing in pci_vpd_find_tag() (diff)
downloadlinux-dev-acfbb1b8a494d7bfd316dfb363a820e6df637e8d.tar.xz
linux-dev-acfbb1b8a494d7bfd316dfb363a820e6df637e8d.zip
PCI/VPD: Add pci_vpd_find_id_string()
Add a pci_vpd_find_id_string() API function to retrieve the ID string from VPD. This way callers don't need pci_vpd_lrdt_size() any longer, and it can be made private to the VPD core. Link: https://lore.kernel.org/r/c5225bf6-8d29-970d-e271-0d7b52252630@gmail.com Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/vpd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c
index b7bf014ccc5f..79712b3d17b6 100644
--- a/drivers/pci/vpd.c
+++ b/drivers/pci/vpd.c
@@ -320,6 +320,12 @@ static int pci_vpd_find_tag(const u8 *buf, unsigned int len, u8 rdt, unsigned in
return -ENOENT;
}
+int pci_vpd_find_id_string(const u8 *buf, unsigned int len, unsigned int *size)
+{
+ return pci_vpd_find_tag(buf, len, PCI_VPD_LRDT_ID_STRING, size);
+}
+EXPORT_SYMBOL_GPL(pci_vpd_find_id_string);
+
static int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off,
unsigned int len, const char *kw)
{