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/gt64xxx.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'hw/gt64xxx.c') diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c index 9fc51f214..79d2dfbb2 100644 --- a/hw/gt64xxx.c +++ b/hw/gt64xxx.c @@ -1153,10 +1153,22 @@ static DeviceInfo gt64120_pci_info = { .class_init = gt64120_pci_class_init, }; +static void gt64120_class_init(ObjectClass *klass, void *data) +{ + SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass); + + sdc->init = gt64120_init; +} + +static DeviceInfo gt64120_info = { + .name = "gt64120", + .size = sizeof(GT64120State), + .class_init = gt64120_class_init, +}; + static void gt64120_pci_register_devices(void) { - sysbus_register_dev("gt64120", sizeof(GT64120State), - gt64120_init); + sysbus_qdev_register(>64120_info); pci_qdev_register(>64120_pci_info); } -- cgit v1.2.3