From e1cdbdbbfb98a28fe7198ae6cd3e571269a04403 Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Tue, 14 Mar 2023 10:45:27 +0100 Subject: Revert "pcidev: remove pcidev_getdevfn() function" As Edward pointed out correctly this function does more than abstracting the different versions of `pci_get_dev()`. It also hide the usage of the global `struct pci_access pacc` from the caller. This reverts commit 0e8902f1ff2b927bb91a5e89e4fde3d8d71f6692. Change-Id: I0cd2f54cb6a6e35dc353476e0f5e502cbbd06cba Signed-off-by: Thomas Heijligen Reviewed-on: https://review.coreboot.org/c/flashrom/+/73730 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan Reviewed-by: Anastasia Klimchuk --- board_enable.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'board_enable.c') diff --git a/board_enable.c b/board_enable.c index 3e6a5a7c..d35b151b 100644 --- a/board_enable.c +++ b/board_enable.c @@ -1095,12 +1095,11 @@ static int nvidia_mcp_gpio_set(int gpio, int raise) return -1; } - dev = pci_get_dev(pacc, dev->domain, dev->bus, dev->dev, 1); + dev = pcidev_getdevfn(dev, 1); if (!dev) { msg_perr("MCP SMBus controller could not be found\n"); return -1; } - pci_fill_info(dev, PCI_FILL_IDENT); devclass = pci_read_word(dev, PCI_CLASS_DEVICE); if (devclass != 0x0C05) { msg_perr("Unexpected device class %04x for SMBus" -- cgit v1.2.3