From e855761ca8fa08ebe29c1e69abc6f0863a453f92 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Tue, 6 Dec 2011 19:32:44 -0600 Subject: qdev: prepare source tree for code conversion These are various small stylistic changes which help make things more consistent such that the automated conversion script can be simpler. It's not necessary to agree or disagree with these style changes because all of this code is going to be rewritten by the patch monkey script anyway. Signed-off-by: Anthony Liguori --- hw/ide/piix.c | 70 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 36 insertions(+), 34 deletions(-) (limited to 'hw/ide/piix.c') diff --git a/hw/ide/piix.c b/hw/ide/piix.c index c0e345087b..91b77a2026 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -237,43 +237,45 @@ PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn) return dev; } -static PCIDeviceInfo piix_ide_info[] = { - { - .qdev.name = "piix3-ide", - .qdev.size = sizeof(PCIIDEState), - .qdev.no_user = 1, - .no_hotplug = 1, - .init = pci_piix_ide_initfn, - .exit = pci_piix_ide_exitfn, - .vendor_id = PCI_VENDOR_ID_INTEL, - .device_id = PCI_DEVICE_ID_INTEL_82371SB_1, - .class_id = PCI_CLASS_STORAGE_IDE, - },{ - .qdev.name = "piix3-ide-xen", - .qdev.size = sizeof(PCIIDEState), - .qdev.no_user = 1, - .qdev.unplug = pci_piix3_xen_ide_unplug, - .init = pci_piix_ide_initfn, - .vendor_id = PCI_VENDOR_ID_INTEL, - .device_id = PCI_DEVICE_ID_INTEL_82371SB_1, - .class_id = PCI_CLASS_STORAGE_IDE, - },{ - .qdev.name = "piix4-ide", - .qdev.size = sizeof(PCIIDEState), - .qdev.no_user = 1, - .no_hotplug = 1, - .init = pci_piix_ide_initfn, - .exit = pci_piix_ide_exitfn, - .vendor_id = PCI_VENDOR_ID_INTEL, - .device_id = PCI_DEVICE_ID_INTEL_82371AB, - .class_id = PCI_CLASS_STORAGE_IDE, - },{ - /* end of list */ - } +static PCIDeviceInfo piix3_ide_info = { + .qdev.name = "piix3-ide", + .qdev.size = sizeof(PCIIDEState), + .qdev.no_user = 1, + .no_hotplug = 1, + .init = pci_piix_ide_initfn, + .exit = pci_piix_ide_exitfn, + .vendor_id = PCI_VENDOR_ID_INTEL, + .device_id = PCI_DEVICE_ID_INTEL_82371SB_1, + .class_id = PCI_CLASS_STORAGE_IDE, +}; + +static PCIDeviceInfo piix3_ide_xen_info = { + .qdev.name = "piix3-ide-xen", + .qdev.size = sizeof(PCIIDEState), + .qdev.no_user = 1, + .qdev.unplug = pci_piix3_xen_ide_unplug, + .init = pci_piix_ide_initfn, + .vendor_id = PCI_VENDOR_ID_INTEL, + .device_id = PCI_DEVICE_ID_INTEL_82371SB_1, + .class_id = PCI_CLASS_STORAGE_IDE, +}; + +static PCIDeviceInfo piix4_ide_info = { + .qdev.name = "piix4-ide", + .qdev.size = sizeof(PCIIDEState), + .qdev.no_user = 1, + .no_hotplug = 1, + .init = pci_piix_ide_initfn, + .exit = pci_piix_ide_exitfn, + .vendor_id = PCI_VENDOR_ID_INTEL, + .device_id = PCI_DEVICE_ID_INTEL_82371AB, + .class_id = PCI_CLASS_STORAGE_IDE, }; static void piix_ide_register(void) { - pci_qdev_register_many(piix_ide_info); + pci_qdev_register(&piix3_ide_info); + pci_qdev_register(&piix3_ide_xen_info); + pci_qdev_register(&piix4_ide_info); } device_init(piix_ide_register); -- cgit v1.2.1