summaryrefslogtreecommitdiff
path: root/src/soc
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/soc
parent7c45c8363d86280d70cb671ea713a06fd462a6e7 (diff)
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/soc')
-rw-r--r--src/soc/amd/picasso/northbridge.c2
-rw-r--r--src/soc/amd/stoneyridge/northbridge.c2
-rw-r--r--src/soc/cavium/cn81xx/ecam0.c2
-rw-r--r--src/soc/cavium/cn81xx/soc.c1
-rw-r--r--src/soc/intel/apollolake/chip.c3
-rw-r--r--src/soc/intel/baytrail/chip.c3
-rw-r--r--src/soc/intel/baytrail/emmc.c2
-rw-r--r--src/soc/intel/baytrail/hda.c2
-rw-r--r--src/soc/intel/baytrail/lpe.c2
-rw-r--r--src/soc/intel/baytrail/lpss.c2
-rw-r--r--src/soc/intel/baytrail/northcluster.c5
-rw-r--r--src/soc/intel/baytrail/sata.c1
-rw-r--r--src/soc/intel/baytrail/sd.c2
-rw-r--r--src/soc/intel/baytrail/southcluster.c1
-rw-r--r--src/soc/intel/braswell/chip.c2
-rw-r--r--src/soc/intel/braswell/lpe.c2
-rw-r--r--src/soc/intel/braswell/lpss.c2
-rw-r--r--src/soc/intel/braswell/southcluster.c1
-rw-r--r--src/soc/intel/denverton_ns/chip.c1
-rw-r--r--src/soc/intel/denverton_ns/csme_ie_kt.c2
-rw-r--r--src/soc/intel/denverton_ns/npk.c1
-rw-r--r--src/soc/intel/denverton_ns/pmc.c1
-rw-r--r--src/soc/intel/denverton_ns/sata.c1
-rw-r--r--src/soc/intel/denverton_ns/xhci.c1
-rw-r--r--src/soc/intel/xeon_sp/cpx/chip.c1
-rw-r--r--src/soc/intel/xeon_sp/skx/chip.c1
-rw-r--r--src/soc/intel/xeon_sp/uncore.c3
-rw-r--r--src/soc/nvidia/tegra124/soc.c1
-rw-r--r--src/soc/nvidia/tegra210/soc.c1
-rw-r--r--src/soc/rockchip/rk3288/soc.c1
-rw-r--r--src/soc/samsung/exynos5250/cpu.c1
-rw-r--r--src/soc/samsung/exynos5420/cpu.c1
32 files changed, 0 insertions, 54 deletions
diff --git a/src/soc/amd/picasso/northbridge.c b/src/soc/amd/picasso/northbridge.c
index 20589a95e3..b6e5d5c8a1 100644
--- a/src/soc/amd/picasso/northbridge.c
+++ b/src/soc/amd/picasso/northbridge.c
@@ -205,8 +205,6 @@ static struct device_operations northbridge_operations = {
.enable_resources = pci_dev_enable_resources,
.acpi_fill_ssdt = northbridge_fill_ssdt_generator,
.write_acpi_tables = agesa_write_acpi_tables,
- .enable = 0,
- .ops_pci = 0,
};
static const struct pci_driver family15_northbridge __pci_driver = {
diff --git a/src/soc/amd/stoneyridge/northbridge.c b/src/soc/amd/stoneyridge/northbridge.c
index afcd49824b..b853d5f287 100644
--- a/src/soc/amd/stoneyridge/northbridge.c
+++ b/src/soc/amd/stoneyridge/northbridge.c
@@ -358,8 +358,6 @@ static struct device_operations northbridge_operations = {
.init = northbridge_init,
.acpi_fill_ssdt = northbridge_fill_ssdt_generator,
.write_acpi_tables = agesa_write_acpi_tables,
- .enable = 0,
- .ops_pci = 0,
};
static const unsigned short pci_device_ids[] = {
diff --git a/src/soc/cavium/cn81xx/ecam0.c b/src/soc/cavium/cn81xx/ecam0.c
index 1f2ba843c6..777cd10967 100644
--- a/src/soc/cavium/cn81xx/ecam0.c
+++ b/src/soc/cavium/cn81xx/ecam0.c
@@ -320,8 +320,6 @@ static void ecam0_init(struct device *dev)
}
struct device_operations pci_domain_ops_ecam0 = {
- .set_resources = NULL,
- .enable_resources = NULL,
.read_resources = ecam0_read_resources,
.init = ecam0_init,
.scan_bus = pci_domain_scan_bus,
diff --git a/src/soc/cavium/cn81xx/soc.c b/src/soc/cavium/cn81xx/soc.c
index 02b7da6140..9312593fe6 100644
--- a/src/soc/cavium/cn81xx/soc.c
+++ b/src/soc/cavium/cn81xx/soc.c
@@ -394,7 +394,6 @@ static struct device_operations soc_ops = {
.enable_resources = DEVICE_NOOP,
.init = soc_init,
.final = soc_final,
- .scan_bus = NULL,
};
static void enable_soc_dev(struct device *dev)
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index ee533bb743..2c8737f654 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -214,8 +214,6 @@ static void pci_domain_set_resources(struct device *dev)
static struct device_operations pci_domain_ops = {
.read_resources = pci_domain_read_resources,
.set_resources = pci_domain_set_resources,
- .enable_resources = NULL,
- .init = NULL,
.scan_bus = pci_domain_scan_bus,
.acpi_name = &soc_acpi_name,
};
@@ -225,7 +223,6 @@ static struct device_operations cpu_bus_ops = {
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
.init = apollolake_init_cpus,
- .scan_bus = NULL,
.acpi_fill_ssdt = generate_cpu_entries,
};
diff --git a/src/soc/intel/baytrail/chip.c b/src/soc/intel/baytrail/chip.c
index f65d4f251c..10bb245581 100644
--- a/src/soc/intel/baytrail/chip.c
+++ b/src/soc/intel/baytrail/chip.c
@@ -28,8 +28,6 @@ static void pci_domain_set_resources(struct device *dev)
static struct device_operations pci_domain_ops = {
.read_resources = pci_domain_read_resources,
.set_resources = pci_domain_set_resources,
- .enable_resources = NULL,
- .init = NULL,
.scan_bus = pci_domain_scan_bus,
};
@@ -38,7 +36,6 @@ static struct device_operations cpu_bus_ops = {
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
.init = baytrail_init_cpus,
- .scan_bus = NULL,
};
diff --git a/src/soc/intel/baytrail/emmc.c b/src/soc/intel/baytrail/emmc.c
index 8994e43af8..885bc0fbb1 100644
--- a/src/soc/intel/baytrail/emmc.c
+++ b/src/soc/intel/baytrail/emmc.c
@@ -59,8 +59,6 @@ static struct device_operations device_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = emmc_init,
- .enable = NULL,
- .scan_bus = NULL,
.ops_pci = &soc_pci_ops,
};
diff --git a/src/soc/intel/baytrail/hda.c b/src/soc/intel/baytrail/hda.c
index e8be1e2327..45430070d2 100644
--- a/src/soc/intel/baytrail/hda.c
+++ b/src/soc/intel/baytrail/hda.c
@@ -100,8 +100,6 @@ static const struct device_operations device_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = hda_init,
- .enable = NULL,
- .scan_bus = NULL,
.ops_pci = &soc_pci_ops,
};
diff --git a/src/soc/intel/baytrail/lpe.c b/src/soc/intel/baytrail/lpe.c
index e34af1e2d7..a2c71e62d8 100644
--- a/src/soc/intel/baytrail/lpe.c
+++ b/src/soc/intel/baytrail/lpe.c
@@ -173,8 +173,6 @@ static const struct device_operations device_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = lpe_init,
- .enable = NULL,
- .scan_bus = NULL,
.ops_pci = &soc_pci_ops,
};
diff --git a/src/soc/intel/baytrail/lpss.c b/src/soc/intel/baytrail/lpss.c
index 71b6dacbb5..9cc8025957 100644
--- a/src/soc/intel/baytrail/lpss.c
+++ b/src/soc/intel/baytrail/lpss.c
@@ -171,8 +171,6 @@ static struct device_operations device_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = lpss_init,
- .enable = NULL,
- .scan_bus = NULL,
.ops_pci = &soc_pci_ops,
};
diff --git a/src/soc/intel/baytrail/northcluster.c b/src/soc/intel/baytrail/northcluster.c
index 0b61fe7d05..38bbfc27ad 100644
--- a/src/soc/intel/baytrail/northcluster.c
+++ b/src/soc/intel/baytrail/northcluster.c
@@ -137,11 +137,6 @@ static void nc_read_resources(struct device *dev)
static struct device_operations nc_ops = {
.read_resources = nc_read_resources,
.acpi_fill_ssdt = generate_cpu_entries,
- .set_resources = NULL,
- .enable_resources = NULL,
- .init = NULL,
- .enable = NULL,
- .scan_bus = NULL,
.ops_pci = &soc_pci_ops,
};
diff --git a/src/soc/intel/baytrail/sata.c b/src/soc/intel/baytrail/sata.c
index 33fb04316b..f56975fd39 100644
--- a/src/soc/intel/baytrail/sata.c
+++ b/src/soc/intel/baytrail/sata.c
@@ -212,7 +212,6 @@ static struct device_operations sata_ops = {
.enable_resources = pci_dev_enable_resources,
.init = sata_init,
.enable = sata_enable,
- .scan_bus = NULL,
.ops_pci = &soc_pci_ops,
};
diff --git a/src/soc/intel/baytrail/sd.c b/src/soc/intel/baytrail/sd.c
index dd2b61ac7d..7c587650f9 100644
--- a/src/soc/intel/baytrail/sd.c
+++ b/src/soc/intel/baytrail/sd.c
@@ -50,8 +50,6 @@ static const struct device_operations device_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = sd_init,
- .enable = NULL,
- .scan_bus = NULL,
.ops_pci = &soc_pci_ops,
};
diff --git a/src/soc/intel/baytrail/southcluster.c b/src/soc/intel/baytrail/southcluster.c
index be58f42a58..06cb2619d5 100644
--- a/src/soc/intel/baytrail/southcluster.c
+++ b/src/soc/intel/baytrail/southcluster.c
@@ -523,7 +523,6 @@ static struct device_operations device_ops = {
.set_resources = pci_dev_set_resources,
.acpi_inject_dsdt = southcluster_inject_dsdt,
.write_acpi_tables = acpi_write_hpet,
- .enable_resources = NULL,
.init = sc_init,
.enable = southcluster_enable_dev,
.scan_bus = scan_static_bus,
diff --git a/src/soc/intel/braswell/chip.c b/src/soc/intel/braswell/chip.c
index 90ee850cd9..d63bb77dca 100644
--- a/src/soc/intel/braswell/chip.c
+++ b/src/soc/intel/braswell/chip.c
@@ -31,8 +31,6 @@ static void pci_domain_set_resources(struct device *dev)
static struct device_operations pci_domain_ops = {
.read_resources = pci_domain_read_resources,
.set_resources = pci_domain_set_resources,
- .enable_resources = NULL,
- .init = NULL,
.scan_bus = pci_domain_scan_bus,
};
diff --git a/src/soc/intel/braswell/lpe.c b/src/soc/intel/braswell/lpe.c
index 85e698c535..cf61120895 100644
--- a/src/soc/intel/braswell/lpe.c
+++ b/src/soc/intel/braswell/lpe.c
@@ -197,8 +197,6 @@ static const struct device_operations device_ops = {
.set_resources = lpe_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = lpe_init,
- .enable = NULL,
- .scan_bus = NULL,
.ops_pci = &soc_pci_ops,
};
diff --git a/src/soc/intel/braswell/lpss.c b/src/soc/intel/braswell/lpss.c
index b5c4e3d95c..24377af311 100644
--- a/src/soc/intel/braswell/lpss.c
+++ b/src/soc/intel/braswell/lpss.c
@@ -162,8 +162,6 @@ static struct device_operations device_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = lpss_init,
- .enable = NULL,
- .scan_bus = NULL,
.ops_pci = &soc_pci_ops,
};
diff --git a/src/soc/intel/braswell/southcluster.c b/src/soc/intel/braswell/southcluster.c
index aa054d6801..c166371091 100644
--- a/src/soc/intel/braswell/southcluster.c
+++ b/src/soc/intel/braswell/southcluster.c
@@ -572,7 +572,6 @@ void southcluster_enable_dev(struct device *dev)
static struct device_operations device_ops = {
.read_resources = sc_read_resources,
.set_resources = pci_dev_set_resources,
- .enable_resources = NULL,
.acpi_inject_dsdt = southcluster_inject_dsdt,
.write_acpi_tables = southcluster_write_acpi_tables,
.init = sc_init,
diff --git a/src/soc/intel/denverton_ns/chip.c b/src/soc/intel/denverton_ns/chip.c
index c41d857d88..d21f053b41 100644
--- a/src/soc/intel/denverton_ns/chip.c
+++ b/src/soc/intel/denverton_ns/chip.c
@@ -46,7 +46,6 @@ static struct device_operations cpu_bus_ops = {
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
.init = denverton_init_cpus,
- .scan_bus = NULL,
#if CONFIG(HAVE_ACPI_TABLES)
.acpi_fill_ssdt = generate_cpu_entries,
#endif
diff --git a/src/soc/intel/denverton_ns/csme_ie_kt.c b/src/soc/intel/denverton_ns/csme_ie_kt.c
index 73a680e2b9..a8d081af4c 100644
--- a/src/soc/intel/denverton_ns/csme_ie_kt.c
+++ b/src/soc/intel/denverton_ns/csme_ie_kt.c
@@ -69,8 +69,6 @@ static struct device_operations csme_ie_kt_ops = {
.read_resources = pci_csme_ie_kt_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
- .scan_bus = 0,
- .init = 0,
.ops_pci = &soc_pci_ops,
};
diff --git a/src/soc/intel/denverton_ns/npk.c b/src/soc/intel/denverton_ns/npk.c
index ce57686e01..c22a5c2d40 100644
--- a/src/soc/intel/denverton_ns/npk.c
+++ b/src/soc/intel/denverton_ns/npk.c
@@ -37,7 +37,6 @@ static struct device_operations pmc_ops = {
.read_resources = pci_npk_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
- .scan_bus = 0,
.init = npk_init,
.ops_pci = &soc_pci_ops,
};
diff --git a/src/soc/intel/denverton_ns/pmc.c b/src/soc/intel/denverton_ns/pmc.c
index 7027e1ed26..4094b0953a 100644
--- a/src/soc/intel/denverton_ns/pmc.c
+++ b/src/soc/intel/denverton_ns/pmc.c
@@ -104,7 +104,6 @@ static struct device_operations pmc_ops = {
.read_resources = pci_pmc_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
- .scan_bus = 0,
.init = pmc_init,
.ops_pci = &soc_pci_ops,
};
diff --git a/src/soc/intel/denverton_ns/sata.c b/src/soc/intel/denverton_ns/sata.c
index 9097526619..9ee6254424 100644
--- a/src/soc/intel/denverton_ns/sata.c
+++ b/src/soc/intel/denverton_ns/sata.c
@@ -65,7 +65,6 @@ static struct device_operations sata_ops = {
.enable_resources = pci_dev_enable_resources,
.init = sata_init,
.enable = sata_enable,
- .scan_bus = 0,
.ops_pci = &soc_pci_ops,
};
diff --git a/src/soc/intel/denverton_ns/xhci.c b/src/soc/intel/denverton_ns/xhci.c
index 7c6e88951a..be961de332 100644
--- a/src/soc/intel/denverton_ns/xhci.c
+++ b/src/soc/intel/denverton_ns/xhci.c
@@ -39,7 +39,6 @@ static struct device_operations usb_xhci_ops = {
.enable_resources = pci_dev_enable_resources,
.init = usb_xhci_init,
.enable = pci_dev_enable_resources,
- .scan_bus = 0,
.ops_pci = &soc_pci_ops,
};
diff --git a/src/soc/intel/xeon_sp/cpx/chip.c b/src/soc/intel/xeon_sp/cpx/chip.c
index e4063dc99d..ef18e45e9b 100644
--- a/src/soc/intel/xeon_sp/cpx/chip.c
+++ b/src/soc/intel/xeon_sp/cpx/chip.c
@@ -35,7 +35,6 @@ static struct device_operations cpu_bus_ops = {
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
.init = cpx_init_cpus,
- .scan_bus = NULL,
};
static void chip_enable_dev(struct device *dev)
diff --git a/src/soc/intel/xeon_sp/skx/chip.c b/src/soc/intel/xeon_sp/skx/chip.c
index 764e70fea6..90ae0252e2 100644
--- a/src/soc/intel/xeon_sp/skx/chip.c
+++ b/src/soc/intel/xeon_sp/skx/chip.c
@@ -486,7 +486,6 @@ static struct device_operations cpu_bus_ops = {
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
.init = xeon_sp_init_cpus,
- .scan_bus = NULL,
#if CONFIG(HAVE_ACPI_TABLES)
/* defined in src/soc/intel/common/block/acpi/acpi.c */
.acpi_fill_ssdt = generate_cpu_entries,
diff --git a/src/soc/intel/xeon_sp/uncore.c b/src/soc/intel/xeon_sp/uncore.c
index f549eecd85..670d62a5a5 100644
--- a/src/soc/intel/xeon_sp/uncore.c
+++ b/src/soc/intel/xeon_sp/uncore.c
@@ -287,9 +287,6 @@ static struct device_operations mmapvtd_ops = {
.enable_resources = pci_dev_enable_resources,
.init = mmapvtd_init,
.ops_pci = &soc_pci_ops,
-#if CONFIG(HAVE_ACPI_TABLES)
- .acpi_inject_dsdt = NULL,
-#endif
};
static const unsigned short mmapvtd_ids[] = {
diff --git a/src/soc/nvidia/tegra124/soc.c b/src/soc/nvidia/tegra124/soc.c
index f2e2c0a00c..d291af8ad6 100644
--- a/src/soc/nvidia/tegra124/soc.c
+++ b/src/soc/nvidia/tegra124/soc.c
@@ -57,7 +57,6 @@ static struct device_operations soc_ops = {
.set_resources = DEVICE_NOOP,
.enable_resources = soc_enable,
.init = soc_init,
- .scan_bus = 0,
};
static void enable_tegra124_dev(struct device *dev)
diff --git a/src/soc/nvidia/tegra210/soc.c b/src/soc/nvidia/tegra210/soc.c
index c29a810ee6..22b6dfe497 100644
--- a/src/soc/nvidia/tegra210/soc.c
+++ b/src/soc/nvidia/tegra210/soc.c
@@ -65,7 +65,6 @@ static struct device_operations soc_ops = {
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
.init = DEVICE_NOOP,
- .scan_bus = NULL,
};
static void enable_tegra210_dev(struct device *dev)
diff --git a/src/soc/rockchip/rk3288/soc.c b/src/soc/rockchip/rk3288/soc.c
index 09cd7bcf87..84fa691b2b 100644
--- a/src/soc/rockchip/rk3288/soc.c
+++ b/src/soc/rockchip/rk3288/soc.c
@@ -38,7 +38,6 @@ static struct device_operations soc_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
.init = soc_init,
- .scan_bus = 0,
};
static void enable_rk3288_dev(struct device *dev)
diff --git a/src/soc/samsung/exynos5250/cpu.c b/src/soc/samsung/exynos5250/cpu.c
index 4523964775..989af5962c 100644
--- a/src/soc/samsung/exynos5250/cpu.c
+++ b/src/soc/samsung/exynos5250/cpu.c
@@ -127,7 +127,6 @@ static struct device_operations cpu_ops = {
.set_resources = DEVICE_NOOP,
.enable_resources = cpu_enable,
.init = cpu_init,
- .scan_bus = 0,
};
static void enable_exynos5250_dev(struct device *dev)
diff --git a/src/soc/samsung/exynos5420/cpu.c b/src/soc/samsung/exynos5420/cpu.c
index bcc6878de7..cc6b0480a9 100644
--- a/src/soc/samsung/exynos5420/cpu.c
+++ b/src/soc/samsung/exynos5420/cpu.c
@@ -157,7 +157,6 @@ static struct device_operations cpu_ops = {
.set_resources = DEVICE_NOOP,
.enable_resources = cpu_enable,
.init = cpu_init,
- .scan_bus = 0,
};
static void enable_exynos5420_dev(struct device *dev)