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:
@@ -20,7 +20,6 @@ static struct device_operations hda_audio_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = hda_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
|
@@ -19,7 +19,6 @@ static struct device_operations ide_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = ide_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
|
@@ -49,7 +49,6 @@ static struct device_operations sata_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = sata_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
|
@@ -43,7 +43,6 @@ static struct device_operations sd_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = sd_init,
|
||||
.scan_bus = 0,
|
||||
};
|
||||
|
||||
static const struct pci_driver sd_driver __pci_driver = {
|
||||
|
@@ -20,7 +20,6 @@ static struct device_operations usb_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = usb_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
|
@@ -170,7 +170,6 @@ static struct device_operations sata_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = ahci_raid_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
@@ -195,8 +194,6 @@ static struct device_operations usb_ops = {
|
||||
.read_resources = pci_ehci_read_resources,
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = 0,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
@@ -226,8 +223,6 @@ 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 = 0,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
@@ -242,8 +237,6 @@ static struct device_operations gec_ops = {
|
||||
.read_resources = pci_dev_read_resources,
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = 0,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
|
@@ -26,7 +26,6 @@ static struct device_operations hda_audio_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = hda_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
|
@@ -19,7 +19,6 @@ static struct device_operations ide_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = ide_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
|
@@ -49,7 +49,6 @@ static struct device_operations sata_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = sata_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
|
@@ -44,7 +44,6 @@ static struct device_operations sd_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = sd_init,
|
||||
.scan_bus = 0,
|
||||
};
|
||||
|
||||
static const struct pci_driver sd_driver __pci_driver = {
|
||||
|
@@ -20,7 +20,6 @@ static struct device_operations usb_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = usb_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
|
@@ -333,7 +333,6 @@ static struct device_operations azalia_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = azalia_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &azalia_pci_ops,
|
||||
.acpi_name = azalia_acpi_name,
|
||||
};
|
||||
|
@@ -246,7 +246,6 @@ static struct device_operations sata_ops = {
|
||||
.acpi_fill_ssdt = sata_fill_ssdt,
|
||||
.init = sata_init,
|
||||
.enable = sata_enable,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &sata_pci_ops,
|
||||
.acpi_name = sata_acpi_name,
|
||||
};
|
||||
|
@@ -97,7 +97,6 @@ static struct device_operations usb_ehci_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = usb_ehci_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
.acpi_name = usb_ehci_acpi_name,
|
||||
};
|
||||
|
@@ -53,7 +53,6 @@ static struct device_operations usb_xhci_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = usb_xhci_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &xhci_pci_ops,
|
||||
.acpi_name = xhci_acpi_name,
|
||||
};
|
||||
|
@@ -146,8 +146,6 @@ static const struct device_operations ide_ops_fb_sb = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = ide_init_i82371fb_sb,
|
||||
.scan_bus = 0,
|
||||
.enable = 0,
|
||||
.ops_pci = 0, /* No subsystem IDs on 82371XX! */
|
||||
};
|
||||
|
||||
@@ -157,8 +155,6 @@ static const struct device_operations ide_ops_ab_eb_mb = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = ide_init_i82371ab_eb_mb,
|
||||
.scan_bus = 0,
|
||||
.enable = 0,
|
||||
.ops_pci = 0, /* No subsystem IDs on 82371XX! */
|
||||
};
|
||||
|
||||
|
@@ -135,7 +135,6 @@ static const struct device_operations isa_ops = {
|
||||
#endif
|
||||
.init = isa_init,
|
||||
.scan_bus = scan_static_bus,
|
||||
.enable = 0,
|
||||
.ops_pci = 0, /* No subsystem IDs on 82371EB! */
|
||||
};
|
||||
|
||||
|
@@ -113,7 +113,6 @@ static const struct device_operations smbus_ops = {
|
||||
.read_resources = pwrmgt_read_resources,
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = 0,
|
||||
.scan_bus = scan_smbus,
|
||||
.enable = pwrmgt_enable,
|
||||
.ops_pci = 0, /* No subsystem IDs on 82371EB! */
|
||||
|
@@ -37,8 +37,6 @@ static const struct device_operations usb_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = usb_init,
|
||||
.scan_bus = 0,
|
||||
.enable = 0,
|
||||
.ops_pci = 0, /* No subsystem IDs on 82371EB! */
|
||||
};
|
||||
|
||||
|
@@ -241,7 +241,6 @@ static struct device_operations ac97_audio_ops = {
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.enable = i82801dx_enable,
|
||||
.init = ac97_audio_init,
|
||||
.scan_bus = 0,
|
||||
};
|
||||
|
||||
static struct device_operations ac97_modem_ops = {
|
||||
@@ -250,7 +249,6 @@ static struct device_operations ac97_modem_ops = {
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.enable = i82801dx_enable,
|
||||
.init = ac97_modem_init,
|
||||
.scan_bus = 0,
|
||||
};
|
||||
|
||||
/* 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) */
|
||||
|
@@ -47,7 +47,6 @@ static struct device_operations ide_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = ide_init,
|
||||
.scan_bus = 0,
|
||||
.enable = i82801dx_enable,
|
||||
};
|
||||
|
||||
|
@@ -24,7 +24,6 @@ static struct device_operations usb_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = usb_init,
|
||||
.scan_bus = 0,
|
||||
.enable = i82801dx_enable,
|
||||
};
|
||||
|
||||
|
@@ -25,7 +25,6 @@ static struct device_operations usb2_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = usb2_init,
|
||||
.scan_bus = 0,
|
||||
.enable = i82801dx_enable,
|
||||
};
|
||||
|
||||
|
@@ -243,7 +243,6 @@ static struct device_operations ac97_audio_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = ac97_audio_init,
|
||||
.scan_bus = 0,
|
||||
.enable = i82801gx_enable,
|
||||
.ops_pci = &ac97_pci_ops,
|
||||
};
|
||||
@@ -253,7 +252,6 @@ static struct device_operations ac97_modem_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = ac97_modem_init,
|
||||
.scan_bus = 0,
|
||||
.enable = i82801gx_enable,
|
||||
.ops_pci = &ac97_pci_ops,
|
||||
};
|
||||
|
@@ -300,7 +300,6 @@ static struct device_operations azalia_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = azalia_init,
|
||||
.scan_bus = 0,
|
||||
.enable = i82801gx_enable,
|
||||
.ops_pci = &azalia_pci_ops,
|
||||
};
|
||||
|
@@ -89,7 +89,6 @@ static struct device_operations ide_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = ide_init,
|
||||
.scan_bus = 0,
|
||||
.enable = i82801gx_enable,
|
||||
.ops_pci = &ide_pci_ops,
|
||||
};
|
||||
|
@@ -17,7 +17,6 @@ static struct device_operations nic_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = nic_init,
|
||||
.scan_bus = 0,
|
||||
};
|
||||
|
||||
/* 82801GB/GR/GDH/GBM/GHM (ICH7/ICH7R/ICH7DH/ICH7-M/ICH7-M DH) */
|
||||
|
@@ -227,7 +227,6 @@ static struct device_operations sata_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = sata_init,
|
||||
.scan_bus = 0,
|
||||
.enable = i82801gx_enable,
|
||||
.ops_pci = &sata_pci_ops,
|
||||
};
|
||||
|
@@ -39,7 +39,6 @@ static struct device_operations usb_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = usb_init,
|
||||
.scan_bus = 0,
|
||||
.enable = i82801gx_enable,
|
||||
.ops_pci = &usb_pci_ops,
|
||||
};
|
||||
|
@@ -71,7 +71,6 @@ static struct device_operations usb_ehci_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = usb_ehci_init,
|
||||
.scan_bus = 0,
|
||||
.enable = i82801gx_enable,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
@@ -283,7 +283,6 @@ static struct device_operations azalia_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = azalia_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &azalia_pci_ops,
|
||||
};
|
||||
|
||||
|
@@ -258,7 +258,6 @@ static struct device_operations sata_ops = {
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = sata_init,
|
||||
.enable = sata_enable,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &sata_pci_ops,
|
||||
};
|
||||
|
||||
|
@@ -46,7 +46,6 @@ static struct device_operations device_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = thermal_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &thermal_pci_ops,
|
||||
};
|
||||
|
||||
|
@@ -52,7 +52,6 @@ static struct device_operations usb_ehci_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = usb_ehci_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
|
@@ -283,7 +283,6 @@ static struct device_operations azalia_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = azalia_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &azalia_pci_ops,
|
||||
};
|
||||
|
||||
|
@@ -252,7 +252,6 @@ static struct device_operations sata_ops = {
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = sata_init,
|
||||
.enable = sata_enable,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &sata_pci_ops,
|
||||
};
|
||||
|
||||
|
@@ -46,7 +46,6 @@ static struct device_operations device_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = thermal_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &thermal_pci_ops,
|
||||
};
|
||||
|
||||
|
@@ -54,7 +54,6 @@ static struct device_operations usb_ehci_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = usb_ehci_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
|
@@ -87,7 +87,6 @@ static struct device_operations ioapic_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = p64h2_ioapic_init,
|
||||
.scan_bus = 0,
|
||||
.enable = p64h2_ioapic_enable,
|
||||
};
|
||||
|
||||
|
@@ -308,7 +308,6 @@ static struct device_operations azalia_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = azalia_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &azalia_pci_ops,
|
||||
};
|
||||
|
||||
|
@@ -229,7 +229,6 @@ static struct device_operations sata_ops = {
|
||||
.init = sata_init,
|
||||
.enable = sata_enable,
|
||||
.acpi_fill_ssdt = sata_fill_ssdt,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &sata_pci_ops,
|
||||
};
|
||||
|
||||
|
@@ -40,7 +40,6 @@ static struct device_operations thermal_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = thermal_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &pci_ops,
|
||||
};
|
||||
|
||||
|
@@ -80,7 +80,6 @@ static struct device_operations usb_ehci_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = usb_ehci_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
|
@@ -149,7 +149,6 @@ static struct device_operations azalia_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = azalia_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &azalia_pci_ops,
|
||||
};
|
||||
|
||||
|
@@ -321,7 +321,6 @@ static struct device_operations sata_ops = {
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = sata_init,
|
||||
.enable = sata_enable,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &sata_pci_ops,
|
||||
};
|
||||
|
||||
|
@@ -177,7 +177,6 @@ static struct device_operations usb_ehci_ops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = usb_ehci_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &lops_pci,
|
||||
};
|
||||
|
||||
|
@@ -58,7 +58,6 @@ struct device_operations southbridge_ti_pci1x2x_pciops = {
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = cardbus_enable_resources,
|
||||
.init = ti_pci1x2y_init,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &ti_pci1x2y_pci_ops,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user