src: Use pci_dev_ops_pci where applicable
Change-Id: Ie004a94a49fc8f53c370412bee1c3e7eacbf8beb
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41944
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/src/southbridge/intel/lynxpoint/azalia.c b/src/southbridge/intel/lynxpoint/azalia.c
index 4122dbb..f415170 100644
--- a/src/southbridge/intel/lynxpoint/azalia.c
+++ b/src/southbridge/intel/lynxpoint/azalia.c
@@ -137,16 +137,12 @@
}
}
-static struct pci_operations azalia_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations azalia_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = azalia_init,
- .ops_pci = &azalia_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const unsigned short pci_device_ids[] = { 0x8c20, 0x9c20, 0 };
diff --git a/src/southbridge/intel/lynxpoint/lpc.c b/src/southbridge/intel/lynxpoint/lpc.c
index 1d75555..8a61b29 100644
--- a/src/southbridge/intel/lynxpoint/lpc.c
+++ b/src/southbridge/intel/lynxpoint/lpc.c
@@ -926,10 +926,6 @@
outb(APM_CNT_FINALIZE, APM_CNT);
}
-static struct pci_operations pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations device_ops = {
.read_resources = pch_lpc_read_resources,
.set_resources = pci_dev_set_resources,
@@ -942,7 +938,7 @@
.final = lpc_final,
.enable = pch_lpc_enable,
.scan_bus = scan_static_bus,
- .ops_pci = &pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
diff --git a/src/southbridge/intel/lynxpoint/me_9.x.c b/src/southbridge/intel/lynxpoint/me_9.x.c
index 6223a3d..aeab0c7 100644
--- a/src/southbridge/intel/lynxpoint/me_9.x.c
+++ b/src/southbridge/intel/lynxpoint/me_9.x.c
@@ -848,10 +848,6 @@
*/
}
-static struct pci_operations pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static void intel_me_enable(struct device *dev)
{
/* Avoid talking to the device in S3 path */
@@ -867,7 +863,7 @@
.enable_resources = pci_dev_enable_resources,
.enable = intel_me_enable,
.init = intel_me_init,
- .ops_pci = &pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const unsigned short pci_device_ids[] = {
diff --git a/src/southbridge/intel/lynxpoint/pcie.c b/src/southbridge/intel/lynxpoint/pcie.c
index e11a0b7..d957e8d 100644
--- a/src/southbridge/intel/lynxpoint/pcie.c
+++ b/src/southbridge/intel/lynxpoint/pcie.c
@@ -708,10 +708,6 @@
root_port_commit_config();
}
-static struct pci_operations pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations device_ops = {
.read_resources = pci_bus_read_resources,
.set_resources = pci_dev_set_resources,
@@ -719,7 +715,7 @@
.init = pci_init,
.enable = pch_pcie_enable,
.scan_bus = pciexp_scan_bridge,
- .ops_pci = &pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const unsigned short pci_device_ids[] = {
diff --git a/src/southbridge/intel/lynxpoint/sata.c b/src/southbridge/intel/lynxpoint/sata.c
index ab96d62..47e6f9b 100644
--- a/src/southbridge/intel/lynxpoint/sata.c
+++ b/src/southbridge/intel/lynxpoint/sata.c
@@ -310,17 +310,13 @@
pci_write_config16(dev, 0x90, map);
}
-static struct pci_operations sata_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations sata_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = sata_init,
.enable = sata_enable,
- .ops_pci = &sata_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const unsigned short pci_device_ids[] = {
diff --git a/src/southbridge/intel/lynxpoint/serialio.c b/src/southbridge/intel/lynxpoint/serialio.c
index adb9067..cdb1f35 100644
--- a/src/southbridge/intel/lynxpoint/serialio.c
+++ b/src/southbridge/intel/lynxpoint/serialio.c
@@ -220,16 +220,12 @@
}
}
-static struct pci_operations pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations device_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = serialio_init,
- .ops_pci = &pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const unsigned short pci_device_ids[] = {
diff --git a/src/southbridge/intel/lynxpoint/smbus.c b/src/southbridge/intel/lynxpoint/smbus.c
index e78d85d..39003f6 100644
--- a/src/southbridge/intel/lynxpoint/smbus.c
+++ b/src/southbridge/intel/lynxpoint/smbus.c
@@ -55,10 +55,6 @@
.write_byte = lsmbus_write_byte,
};
-static struct pci_operations smbus_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static void smbus_read_resources(struct device *dev)
{
struct resource *res = new_resource(dev, PCI_BASE_ADDRESS_4);
@@ -79,7 +75,7 @@
.scan_bus = scan_smbus,
.init = pch_smbus_init,
.ops_smbus_bus = &lops_smbus_bus,
- .ops_pci = &smbus_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const unsigned short pci_device_ids[] = {
diff --git a/src/southbridge/intel/lynxpoint/usb_xhci.c b/src/southbridge/intel/lynxpoint/usb_xhci.c
index 49a6cfc..8684aa9 100644
--- a/src/southbridge/intel/lynxpoint/usb_xhci.c
+++ b/src/southbridge/intel/lynxpoint/usb_xhci.c
@@ -360,16 +360,12 @@
}
}
-static struct pci_operations lops_pci = {
- .set_subsystem = &pci_dev_set_subsystem,
-};
-
static struct device_operations usb_xhci_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = usb_xhci_init,
- .ops_pci = &lops_pci,
+ .ops_pci = &pci_dev_ops_pci,
};
static const unsigned short pci_device_ids[] = { 0x8c31, /* LynxPoint-H */