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/bd82x6x/azalia.c b/src/southbridge/intel/bd82x6x/azalia.c
index 3be7b44..470c67c 100644
--- a/src/southbridge/intel/bd82x6x/azalia.c
+++ b/src/southbridge/intel/bd82x6x/azalia.c
@@ -322,16 +322,12 @@
return "HDEF";
}
-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,
.acpi_name = azalia_acpi_name,
};
diff --git a/src/southbridge/intel/bd82x6x/lpc.c b/src/southbridge/intel/bd82x6x/lpc.c
index 0f1d33e..691db62 100644
--- a/src/southbridge/intel/bd82x6x/lpc.c
+++ b/src/southbridge/intel/bd82x6x/lpc.c
@@ -861,10 +861,6 @@
memcpy(spi_config, &config->spi, sizeof(*spi_config));
}
-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,
@@ -877,7 +873,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/bd82x6x/me.c b/src/southbridge/intel/bd82x6x/me.c
index 436553c..bc0a71e 100644
--- a/src/southbridge/intel/bd82x6x/me.c
+++ b/src/southbridge/intel/bd82x6x/me.c
@@ -676,16 +676,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 = intel_me_init,
- .ops_pci = &pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const struct pci_driver intel_me __pci_driver = {
diff --git a/src/southbridge/intel/bd82x6x/me_8.x.c b/src/southbridge/intel/bd82x6x/me_8.x.c
index b930d3f..f64e29c 100644
--- a/src/southbridge/intel/bd82x6x/me_8.x.c
+++ b/src/southbridge/intel/bd82x6x/me_8.x.c
@@ -667,16 +667,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 = intel_me_init,
- .ops_pci = &pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const struct pci_driver intel_me __pci_driver = {
diff --git a/src/southbridge/intel/bd82x6x/pci.c b/src/southbridge/intel/bd82x6x/pci.c
index 6b36a4b..e61c60c 100644
--- a/src/southbridge/intel/bd82x6x/pci.c
+++ b/src/southbridge/intel/bd82x6x/pci.c
@@ -44,17 +44,13 @@
pci_write_config16(dev, SECSTS, reg16);
}
-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,
.enable_resources = pci_bus_enable_resources,
.init = pci_init,
.scan_bus = pci_scan_bridge,
- .ops_pci = &pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const struct pci_driver pch_pci __pci_driver = {
diff --git a/src/southbridge/intel/bd82x6x/pcie.c b/src/southbridge/intel/bd82x6x/pcie.c
index 86935f8..5bc3412 100644
--- a/src/southbridge/intel/bd82x6x/pcie.c
+++ b/src/southbridge/intel/bd82x6x/pcie.c
@@ -292,10 +292,6 @@
return NULL;
}
-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,
@@ -304,7 +300,7 @@
.enable = pch_pcie_enable,
.scan_bus = pch_pciexp_scan_bridge,
.acpi_name = pch_pcie_acpi_name,
- .ops_pci = &pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const unsigned short pci_device_ids[] = { 0x1c10, 0x1c12, 0x1c14, 0x1c16,
diff --git a/src/southbridge/intel/bd82x6x/sata.c b/src/southbridge/intel/bd82x6x/sata.c
index 27b4d16..1974e2b 100644
--- a/src/southbridge/intel/bd82x6x/sata.c
+++ b/src/southbridge/intel/bd82x6x/sata.c
@@ -279,10 +279,6 @@
generate_sata_ssdt_ports("\\_SB_.PCI0.SATA", config->sata_port_map);
}
-static struct pci_operations sata_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations sata_ops = {
.read_resources = sata_read_resources,
.set_resources = sata_set_resources,
@@ -290,7 +286,7 @@
.acpi_fill_ssdt = sata_fill_ssdt,
.init = sata_init,
.enable = sata_enable,
- .ops_pci = &sata_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
.acpi_name = sata_acpi_name,
};
diff --git a/src/southbridge/intel/bd82x6x/smbus.c b/src/southbridge/intel/bd82x6x/smbus.c
index 6e5be9b..1b72ea5 100644
--- a/src/southbridge/intel/bd82x6x/smbus.c
+++ b/src/southbridge/intel/bd82x6x/smbus.c
@@ -56,10 +56,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);
@@ -85,7 +81,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,
.acpi_name = smbus_acpi_name,
};
diff --git a/src/southbridge/intel/bd82x6x/usb_xhci.c b/src/southbridge/intel/bd82x6x/usb_xhci.c
index db925e0..5a5b418 100644
--- a/src/southbridge/intel/bd82x6x/usb_xhci.c
+++ b/src/southbridge/intel/bd82x6x/usb_xhci.c
@@ -43,16 +43,12 @@
return "XHC";
}
-static struct pci_operations xhci_pci_ops = {
- .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 = &xhci_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
.acpi_name = xhci_acpi_name,
};