From 1b1066e2d5db21167394e0d40dfe5a0d370c8852 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Sat, 13 Nov 2021 17:59:18 +1100 Subject: pcidev: Move pci_dev_find() from internal to canonical place Also rename to `pcidev_find()` in fitting with pcidev.c helpers. BUG=b:220950271 TEST=```sudo ./flashrom -p internal -r /tmp/bios Found Programmer flash chip "Opaque flash chip" (16384 kB, Programmer-specific) mapped at physical address 0x0000000000000000. Reading flash... done. ``` Change-Id: Ie21f87699481a84398ca4450b3f03548f0528191 Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/59280 Reviewed-by: Thomas Heijligen Tested-by: build bot (Jenkins) --- sb600spi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sb600spi.c') diff --git a/sb600spi.c b/sb600spi.c index eb540285..6f8cc40a 100644 --- a/sb600spi.c +++ b/sb600spi.c @@ -60,7 +60,7 @@ struct sb600spi_data { static int find_smbus_dev_rev(uint16_t vendor, uint16_t device) { - struct pci_dev *smbus_dev = pci_dev_find(vendor, device); + struct pci_dev *smbus_dev = pcidev_find(vendor, device); if (!smbus_dev) { msg_pdbg("No SMBus device with ID %04X:%04X found.\n", vendor, device); msg_perr("ERROR: SMBus device not found. Not enabling SPI.\n"); @@ -734,11 +734,11 @@ int sb600_probe_spi(struct pci_dev *dev) } /* Look for the SMBus device. */ - smbus_dev = pci_dev_find(0x1002, 0x4385); + smbus_dev = pcidev_find(0x1002, 0x4385); if (!smbus_dev) - smbus_dev = pci_dev_find(0x1022, 0x780b); /* AMD FCH */ + smbus_dev = pcidev_find(0x1022, 0x780b); /* AMD FCH */ if (!smbus_dev) - smbus_dev = pci_dev_find(0x1022, 0x790b); /* AMD FP4 */ + smbus_dev = pcidev_find(0x1022, 0x790b); /* AMD FP4 */ if (!smbus_dev) { msg_perr("ERROR: SMBus device not found. Not enabling SPI.\n"); return ERROR_NONFATAL; -- cgit v1.2.3