diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-06 19:32:44 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-27 10:50:47 -0600 |
commit | e855761ca8fa08ebe29c1e69abc6f0863a453f92 (patch) | |
tree | 21e7769d6ca4bd2ddea01ce80fbe2b6d085960ad /hw/piix_pci.c | |
parent | 3dde52d2fe5fd4783bdd06f88561cbd0695aae06 (diff) | |
download | qemu-e855761ca8fa08ebe29c1e69abc6f0863a453f92.zip qemu-e855761ca8fa08ebe29c1e69abc6f0863a453f92.tar.gz qemu-e855761ca8fa08ebe29c1e69abc6f0863a453f92.tar.bz2 |
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 <aliguori@us.ibm.com>
Diffstat (limited to 'hw/piix_pci.c')
-rw-r--r-- | hw/piix_pci.c | 86 |
1 files changed, 44 insertions, 42 deletions
diff --git a/hw/piix_pci.c b/hw/piix_pci.c index 3652522..5cbeed5 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -502,47 +502,47 @@ static int piix3_initfn(PCIDevice *dev) return 0; } -static PCIDeviceInfo i440fx_info[] = { - { - .qdev.name = "i440FX", - .qdev.desc = "Host bridge", - .qdev.size = sizeof(PCII440FXState), - .qdev.vmsd = &vmstate_i440fx, - .qdev.no_user = 1, - .no_hotplug = 1, - .init = i440fx_initfn, - .config_write = i440fx_write_config, - .vendor_id = PCI_VENDOR_ID_INTEL, - .device_id = PCI_DEVICE_ID_INTEL_82441, - .revision = 0x02, - .class_id = PCI_CLASS_BRIDGE_HOST, - },{ - .qdev.name = "PIIX3", - .qdev.desc = "ISA bridge", - .qdev.size = sizeof(PIIX3State), - .qdev.vmsd = &vmstate_piix3, - .qdev.no_user = 1, - .no_hotplug = 1, - .init = piix3_initfn, - .config_write = piix3_write_config, - .vendor_id = PCI_VENDOR_ID_INTEL, - .device_id = PCI_DEVICE_ID_INTEL_82371SB_0, // 82371SB PIIX3 PCI-to-ISA bridge (Step A1) - .class_id = PCI_CLASS_BRIDGE_ISA, - },{ - .qdev.name = "PIIX3-xen", - .qdev.desc = "ISA bridge", - .qdev.size = sizeof(PIIX3State), - .qdev.vmsd = &vmstate_piix3, - .qdev.no_user = 1, - .no_hotplug = 1, - .init = piix3_initfn, - .config_write = piix3_write_config_xen, - .vendor_id = PCI_VENDOR_ID_INTEL, - .device_id = PCI_DEVICE_ID_INTEL_82371SB_0, // 82371SB PIIX3 PCI-to-ISA bridge (Step A1) - .class_id = PCI_CLASS_BRIDGE_ISA, - },{ - /* end of list */ - } +static PCIDeviceInfo i440fx_info = { + .qdev.name = "i440FX", + .qdev.desc = "Host bridge", + .qdev.size = sizeof(PCII440FXState), + .qdev.vmsd = &vmstate_i440fx, + .qdev.no_user = 1, + .no_hotplug = 1, + .init = i440fx_initfn, + .config_write = i440fx_write_config, + .vendor_id = PCI_VENDOR_ID_INTEL, + .device_id = PCI_DEVICE_ID_INTEL_82441, + .revision = 0x02, + .class_id = PCI_CLASS_BRIDGE_HOST, +}; + +static PCIDeviceInfo piix3_info = { + .qdev.name = "PIIX3", + .qdev.desc = "ISA bridge", + .qdev.size = sizeof(PIIX3State), + .qdev.vmsd = &vmstate_piix3, + .qdev.no_user = 1, + .no_hotplug = 1, + .init = piix3_initfn, + .config_write = piix3_write_config, + .vendor_id = PCI_VENDOR_ID_INTEL, + .device_id = PCI_DEVICE_ID_INTEL_82371SB_0, // 82371SB PIIX3 PCI-to-ISA bridge (Step A1) + .class_id = PCI_CLASS_BRIDGE_ISA, +}; + +static PCIDeviceInfo piix3_xen_info = { + .qdev.name = "PIIX3-xen", + .qdev.desc = "ISA bridge", + .qdev.size = sizeof(PIIX3State), + .qdev.vmsd = &vmstate_piix3, + .qdev.no_user = 1, + .no_hotplug = 1, + .init = piix3_initfn, + .config_write = piix3_write_config_xen, + .vendor_id = PCI_VENDOR_ID_INTEL, + .device_id = PCI_DEVICE_ID_INTEL_82371SB_0, // 82371SB PIIX3 PCI-to-ISA bridge (Step A1) + .class_id = PCI_CLASS_BRIDGE_ISA, }; static SysBusDeviceInfo i440fx_pcihost_info = { @@ -555,7 +555,9 @@ static SysBusDeviceInfo i440fx_pcihost_info = { static void i440fx_register(void) { + pci_qdev_register(&i440fx_info); + pci_qdev_register(&piix3_info); + pci_qdev_register(&piix3_xen_info); sysbus_register_withprop(&i440fx_pcihost_info); - pci_qdev_register_many(i440fx_info); } device_init(i440fx_register); |