From cac023161535253675a23f335b3fddedb395d57d Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Sun, 30 Jun 2019 08:40:04 +0300 Subject: device: Remove device->ops from early stages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7a361187570716df94a3fd441ae78c0f805b1dda Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/33921 Reviewed-by: Patrick Rudolph Tested-by: build bot (Jenkins) --- src/device/pci_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/device/pci_device.c') diff --git a/src/device/pci_device.c b/src/device/pci_device.c index 2c724aad50..9c47085152 100644 --- a/src/device/pci_device.c +++ b/src/device/pci_device.c @@ -592,11 +592,12 @@ void pci_dev_set_resources(struct device *dev) void pci_dev_enable_resources(struct device *dev) { - const struct pci_operations *ops; + const struct pci_operations *ops = NULL; u16 command; /* Set the subsystem vendor and device ID for mainboard devices. */ - ops = ops_pci(dev); + if (dev->ops) + ops = dev->ops->ops_pci; if (dev->on_mainboard && ops && ops->set_subsystem) { if (CONFIG_SUBSYSTEM_VENDOR_ID) dev->subsystem_vendor = CONFIG_SUBSYSTEM_VENDOR_ID; -- cgit v1.2.3