summaryrefslogtreecommitdiff
path: root/pcidev.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcidev.c')
-rw-r--r--pcidev.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pcidev.c b/pcidev.c
index 68da3278..696510ed 100644
--- a/pcidev.c
+++ b/pcidev.c
@@ -190,6 +190,14 @@ struct pci_dev *pcidev_find(uint16_t vendor, uint16_t device)
return pcidev_scandev(&filter, NULL);
}
+struct pci_dev *pcidev_getdevfn(struct pci_dev *dev, const int func)
+{
+ struct pci_dev *const new = pci_get_dev(pacc, dev->domain, dev->bus, dev->dev, func);
+ if (new)
+ pci_fill_info(new, PCI_FILL_IDENT);
+ return new;
+}
+
struct pci_dev *pcidev_find_vendorclass(uint16_t vendor, uint16_t devclass)
{
struct pci_dev *temp = NULL;