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>
This commit is contained in:
parent
7c45c8363d
commit
deeccbf4e9
123 changed files with 0 additions and 207 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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[] = {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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[] = {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue