summaryrefslogtreecommitdiffstats
path: root/src/device/pci_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/pci_device.c')
-rw-r--r--src/device/pci_device.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index 2c724aad5099..9c470851527c 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;