mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 14:11:15 +02:00
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> Reviewed-on: https://review.coreboot.org/c/flashrom/+/73570 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
This commit is contained in:

committed by
Thomas Heijligen

parent
0e4d4eac78
commit
0e8902f1ff
@ -1095,11 +1095,12 @@ static int nvidia_mcp_gpio_set(int gpio, int raise)
|
||||
return -1;
|
||||
}
|
||||
|
||||
dev = pcidev_getdevfn(dev, 1);
|
||||
dev = pci_get_dev(pacc, dev->domain, dev->bus, dev->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"
|
||||
|
Reference in New Issue
Block a user