diff options
Diffstat (limited to 'drivers/pci/vpd.c')
-rw-r--r-- | drivers/pci/vpd.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c index 6bc554576f8d..a5a5ca17cfe6 100644 --- a/drivers/pci/vpd.c +++ b/drivers/pci/vpd.c | |||
@@ -41,3 +41,21 @@ int pci_vpd_find_tag(const u8 *buf, unsigned int off, unsigned int len, u8 rdt) | |||
41 | return -ENOENT; | 41 | return -ENOENT; |
42 | } | 42 | } |
43 | EXPORT_SYMBOL_GPL(pci_vpd_find_tag); | 43 | EXPORT_SYMBOL_GPL(pci_vpd_find_tag); |
44 | |||
45 | int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off, | ||
46 | unsigned int len, const char *kw) | ||
47 | { | ||
48 | int i; | ||
49 | |||
50 | for (i = off; i + PCI_VPD_INFO_FLD_HDR_SIZE <= off + len;) { | ||
51 | if (buf[i + 0] == kw[0] && | ||
52 | buf[i + 1] == kw[1]) | ||
53 | return i; | ||
54 | |||
55 | i += PCI_VPD_INFO_FLD_HDR_SIZE + | ||
56 | pci_vpd_info_field_size(&buf[i]); | ||
57 | } | ||
58 | |||
59 | return -ENOENT; | ||
60 | } | ||
61 | EXPORT_SYMBOL_GPL(pci_vpd_find_info_keyword); | ||