summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-04-04 12:26:35 +0200
committerNico Huber <nico.h@gmx.de>2020-04-05 13:31:28 +0000
commitdeeccbf4e96de1cd4ed136f865b96a90db374886 (patch)
treeb81adfab9c6375bf75196226995aa78e2da247ec /src/drivers
parent7c45c8363d86280d70cb671ea713a06fd462a6e7 (diff)
downloadcoreboot-deeccbf4e96de1cd4ed136f865b96a90db374886.tar.xz
Drop explicit NULL initializations from `device_operations`
Unmentioned fields are initialized with 0 (or NULL) implicitly. Beside that, the struct has grown over the years. There are too many optional fields to list them all. Change-Id: Icb9e14c58153d7c14817bcde148e86e977666e4b Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40126 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/aspeed/ast2050/ast2050.c1
-rw-r--r--src/drivers/dec/21143/21143.c1
-rw-r--r--src/drivers/emulation/qemu/bochs.c1
-rw-r--r--src/drivers/emulation/qemu/cirrus.c1
-rw-r--r--src/drivers/intel/i210/i210.c2
-rw-r--r--src/drivers/net/atl1e.c1
-rw-r--r--src/drivers/net/ne2k.c2
-rw-r--r--src/drivers/net/r8168.c1
-rw-r--r--src/drivers/ricoh/rce822/rce822.c1
-rw-r--r--src/drivers/siemens/nc_fpga/nc_fpga.c2
-rw-r--r--src/drivers/sil/3114/sil_sata.c1
-rw-r--r--src/drivers/uart/oxpcie.c1
-rw-r--r--src/drivers/xgi/z9s/z9s.c1
13 files changed, 0 insertions, 16 deletions
diff --git a/src/drivers/aspeed/ast2050/ast2050.c b/src/drivers/aspeed/ast2050/ast2050.c
index 8bc73078c7..4230146b0c 100644
--- a/src/drivers/aspeed/ast2050/ast2050.c
+++ b/src/drivers/aspeed/ast2050/ast2050.c
@@ -67,7 +67,6 @@ static struct device_operations aspeed_ast2050_ops = {
.set_resources = aspeed_ast2050_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = aspeed_ast2050_init,
- .scan_bus = 0,
};
static const struct pci_driver aspeed_ast2050_driver __pci_driver = {
diff --git a/src/drivers/dec/21143/21143.c b/src/drivers/dec/21143/21143.c
index 0230935752..ff64cf3490 100644
--- a/src/drivers/dec/21143/21143.c
+++ b/src/drivers/dec/21143/21143.c
@@ -43,7 +43,6 @@ static struct device_operations dec_21143_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = dec_21143_enable,
- .scan_bus = 0,
};
static const struct pci_driver dec_21143_driver __pci_driver = {
diff --git a/src/drivers/emulation/qemu/bochs.c b/src/drivers/emulation/qemu/bochs.c
index d9e4ce1d6e..8d08ac1b4c 100644
--- a/src/drivers/emulation/qemu/bochs.c
+++ b/src/drivers/emulation/qemu/bochs.c
@@ -140,7 +140,6 @@ static struct device_operations qemu_graph_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = bochs_init,
- .scan_bus = 0,
};
static const struct pci_driver qemu_stdvga_driver __pci_driver = {
diff --git a/src/drivers/emulation/qemu/cirrus.c b/src/drivers/emulation/qemu/cirrus.c
index 6b1968c31d..4f03578438 100644
--- a/src/drivers/emulation/qemu/cirrus.c
+++ b/src/drivers/emulation/qemu/cirrus.c
@@ -340,7 +340,6 @@ static struct device_operations qemu_cirrus_graph_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = cirrus_init,
- .scan_bus = 0,
};
static const struct pci_driver qemu_cirrus_driver __pci_driver = {
diff --git a/src/drivers/intel/i210/i210.c b/src/drivers/intel/i210/i210.c
index 232a826b4c..cb2414f30c 100644
--- a/src/drivers/intel/i210/i210.c
+++ b/src/drivers/intel/i210/i210.c
@@ -228,8 +228,6 @@ static struct device_operations i210_ops = {
.set_resources = set_resources,
.enable_resources = pci_dev_enable_resources,
.init = init,
- .scan_bus = 0,
- .ops_pci = 0,
};
static const unsigned short i210_device_ids[] = { 0x1537, 0x1538, 0x1533, 0 };
diff --git a/src/drivers/net/atl1e.c b/src/drivers/net/atl1e.c
index 51470b0a78..5cc70ceddd 100644
--- a/src/drivers/net/atl1e.c
+++ b/src/drivers/net/atl1e.c
@@ -162,7 +162,6 @@ static struct device_operations atl1e_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = atl1e_init,
- .scan_bus = 0,
};
static const struct pci_driver atl1e_driver __pci_driver = {
diff --git a/src/drivers/net/ne2k.c b/src/drivers/net/ne2k.c
index b1d72de084..620dab952e 100644
--- a/src/drivers/net/ne2k.c
+++ b/src/drivers/net/ne2k.c
@@ -317,8 +317,6 @@ static struct device_operations ne2k_ops = {
.read_resources = read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
- .init = 0,
- .scan_bus = 0,
};
static const struct pci_driver ne2k_driver __pci_driver = {
diff --git a/src/drivers/net/r8168.c b/src/drivers/net/r8168.c
index c764b433b6..6e9437005d 100644
--- a/src/drivers/net/r8168.c
+++ b/src/drivers/net/r8168.c
@@ -372,7 +372,6 @@ static struct device_operations r8168_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = r8168_init,
- .scan_bus = 0,
#if CONFIG(HAVE_ACPI_TABLES)
.acpi_name = r8168_net_acpi_name,
.acpi_fill_ssdt = r8168_net_fill_ssdt,
diff --git a/src/drivers/ricoh/rce822/rce822.c b/src/drivers/ricoh/rce822/rce822.c
index fd425824c0..08e328da72 100644
--- a/src/drivers/ricoh/rce822/rce822.c
+++ b/src/drivers/ricoh/rce822/rce822.c
@@ -58,7 +58,6 @@ static struct device_operations rce822_ops = {
.enable_resources = pci_dev_enable_resources,
.init = rce822_init,
.enable = rce822_enable,
- .scan_bus = 0,
.ops_pci = &lops_pci,
};
diff --git a/src/drivers/siemens/nc_fpga/nc_fpga.c b/src/drivers/siemens/nc_fpga/nc_fpga.c
index 355e0f90a8..b305a8c848 100644
--- a/src/drivers/siemens/nc_fpga/nc_fpga.c
+++ b/src/drivers/siemens/nc_fpga/nc_fpga.c
@@ -158,8 +158,6 @@ static struct device_operations nc_fpga_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = nc_fpga_init,
- .scan_bus = 0,
- .ops_pci = 0,
};
static const unsigned short nc_fpga_device_ids[] = { 0x4080, 0x4091, 0 };
diff --git a/src/drivers/sil/3114/sil_sata.c b/src/drivers/sil/3114/sil_sata.c
index c38e642016..a249181ea7 100644
--- a/src/drivers/sil/3114/sil_sata.c
+++ b/src/drivers/sil/3114/sil_sata.c
@@ -38,7 +38,6 @@ static struct device_operations si_sata_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = si_sata_init,
- .scan_bus = 0,
};
static const struct pci_driver si_sata_driver __pci_driver = {
diff --git a/src/drivers/uart/oxpcie.c b/src/drivers/uart/oxpcie.c
index 999c6baec9..60b524576e 100644
--- a/src/drivers/uart/oxpcie.c
+++ b/src/drivers/uart/oxpcie.c
@@ -52,7 +52,6 @@ static struct device_operations oxford_oxpcie_ops = {
.set_resources = oxford_oxpcie_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = oxford_oxpcie_enable,
- .scan_bus = 0,
};
static const struct pci_driver oxford_oxpcie_driver __pci_driver = {
diff --git a/src/drivers/xgi/z9s/z9s.c b/src/drivers/xgi/z9s/z9s.c
index 62c80aa271..c0aa3b3d91 100644
--- a/src/drivers/xgi/z9s/z9s.c
+++ b/src/drivers/xgi/z9s/z9s.c
@@ -50,7 +50,6 @@ static struct device_operations xgi_z9s_ops = {
.set_resources = xgi_z9s_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = xgi_z9s_init,
- .scan_bus = 0,
};
static const struct pci_driver xgi_z9s_driver __pci_driver = {