Thomas Heijligen has uploaded this change for review.
pcidev: remove pcidev_getdevfn() function
This function is only called once. Move the content of the function into
the caller.
Change-Id: Id2983420080f75ae6992edfb032bf5c83b29c803
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
---
M board_enable.c
M include/programmer.h
M pcidev.c
3 files changed, 15 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/70/73570/1
diff --git a/board_enable.c b/board_enable.c
index d35b151..b7bccf3 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -1095,7 +1095,8 @@
return -1;
}
- dev = pcidev_getdevfn(dev, 1);
+ dev = pci_get_dev(pacc, dev->domain, dev->bus, dev->dev, 1);
+ pci_fill_info(dev, PCI_FILL_IDENT);
if (!dev) {
msg_perr("MCP SMBus controller could not be found\n");
return -1;
diff --git a/include/programmer.h b/include/programmer.h
index d8d8b4a..9728d8d 100644
--- a/include/programmer.h
+++ b/include/programmer.h
@@ -125,7 +125,6 @@
uintptr_t pcidev_readbar(struct pci_dev *dev, int bar);
struct pci_dev *pcidev_init(const struct programmer_cfg *cfg, const struct dev_entry *devs, int bar);
struct pci_dev *pcidev_scandev(struct pci_filter *filter, struct pci_dev *start);
-struct pci_dev *pcidev_getdevfn(struct pci_dev *dev, const int func);
struct pci_dev *pcidev_find_vendorclass(uint16_t vendor, uint16_t devclass);
struct pci_dev *pcidev_card_find(uint16_t vendor, uint16_t device, uint16_t card_vendor, uint16_t card_device);
struct pci_dev *pcidev_find(uint16_t vendor, uint16_t device);
diff --git a/pcidev.c b/pcidev.c
index 696510e..68da327 100644
--- a/pcidev.c
+++ b/pcidev.c
@@ -190,14 +190,6 @@
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;
To view, visit change 73570. To unsubscribe, or for help writing mail filters, visit settings.