From 999e12bbe85c5dcf49bef13bce4f97399c7105f4 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Tue, 24 Jan 2012 13:12:29 -0600 Subject: sysbus: apic: ioapic: convert to QEMU Object Model This converts three devices because apic and ioapic are subclasses of sysbus. Converting subclasses independently of their base class is prohibitively hard. Signed-off-by: Anthony Liguori --- hw/grackle_pci.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'hw/grackle_pci.c') diff --git a/hw/grackle_pci.c b/hw/grackle_pci.c index a790f979e6..549859ddcd 100644 --- a/hw/grackle_pci.c +++ b/hw/grackle_pci.c @@ -139,16 +139,23 @@ static DeviceInfo grackle_pci_info = { .class_init = grackle_pci_class_init, }; -static SysBusDeviceInfo grackle_pci_host_info = { - .qdev.name = "grackle-pcihost", - .qdev.size = sizeof(GrackleState), - .qdev.no_user = 1, - .init = pci_grackle_init_device, +static void pci_grackle_class_init(ObjectClass *klass, void *data) +{ + SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); + + k->init = pci_grackle_init_device; +} + +static DeviceInfo grackle_pci_host_info = { + .name = "grackle-pcihost", + .size = sizeof(GrackleState), + .no_user = 1, + .class_init = pci_grackle_class_init, }; static void grackle_register_devices(void) { - sysbus_register_withprop(&grackle_pci_host_info); + sysbus_qdev_register(&grackle_pci_host_info); pci_qdev_register(&grackle_pci_info); } -- cgit v1.2.3