summaryrefslogtreecommitdiff
path: root/hw/ide/piix.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-06 19:32:44 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-01-27 10:50:47 -0600
commite855761ca8fa08ebe29c1e69abc6f0863a453f92 (patch)
tree21e7769d6ca4bd2ddea01ce80fbe2b6d085960ad /hw/ide/piix.c
parent3dde52d2fe5fd4783bdd06f88561cbd0695aae06 (diff)
downloadqemu-e855761ca8fa08ebe29c1e69abc6f0863a453f92.tar.gz
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/ide/piix.c')
-rw-r--r--hw/ide/piix.c70
1 files changed, 36 insertions, 34 deletions
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);