From 61a255c1c55561eed48ad19ea5f40425766e88cc Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sat, 30 Mar 2024 11:25:14 +0100 Subject: use C99 initializers for struct pci_system_methods --- src/openbsd_pci.c | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/src/openbsd_pci.c b/src/openbsd_pci.c index 1ca98de..daf9118 100644 --- a/src/openbsd_pci.c +++ b/src/openbsd_pci.c @@ -594,29 +594,24 @@ pci_device_openbsd_unmap_legacy(struct pci_device *dev, void *addr, } static const struct pci_system_methods openbsd_pci_methods = { - pci_system_openbsd_destroy, - NULL, - pci_device_openbsd_read_rom, - pci_device_openbsd_probe, - pci_device_openbsd_map_range, - pci_device_openbsd_unmap_range, - pci_device_openbsd_read, - pci_device_openbsd_write, - pci_fill_capabilities_generic, - NULL, - pci_device_openbsd_boot_vga, - NULL, - NULL, - pci_device_openbsd_open_legacy_io, - NULL, - pci_device_openbsd_read32, - pci_device_openbsd_read16, - pci_device_openbsd_read8, - pci_device_openbsd_write32, - pci_device_openbsd_write16, - pci_device_openbsd_write8, - pci_device_openbsd_map_legacy, - pci_device_openbsd_unmap_legacy + .destroy = pci_system_openbsd_destroy, + .read_rom = pci_device_openbsd_read_rom, + .probe = pci_device_openbsd_probe, + .map_range = pci_device_openbsd_map_range, + .unmap_range = pci_device_openbsd_unmap_range, + .read = pci_device_openbsd_read, + .write = pci_device_openbsd_write, + .fill_capabilities = pci_fill_capabilities_generic, + .boot_vga = pci_device_openbsd_boot_vga, + .open_legacy_io = pci_device_openbsd_open_legacy_io, + .read32 = pci_device_openbsd_read32, + .read16 = pci_device_openbsd_read16, + .read8 = pci_device_openbsd_read8, + .write32 = pci_device_openbsd_write32, + .write16 = pci_device_openbsd_write16, + .write8 = pci_device_openbsd_write8, + .map_legacy = pci_device_openbsd_map_legacy, + .unmap_legacy = pci_device_openbsd_unmap_legacy }; int -- cgit v1.2.3