diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-24 13:12:29 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-27 10:50:50 -0600 |
commit | 999e12bbe85c5dcf49bef13bce4f97399c7105f4 (patch) | |
tree | 73b6ed8633a73134e9f728baa1ed2b1dab58b5b0 /hw/gt64xxx.c | |
parent | 40021f08882aaef93c66c8c740087b6d3031b63a (diff) | |
download | hqemu-999e12bbe85c5dcf49bef13bce4f97399c7105f4.zip hqemu-999e12bbe85c5dcf49bef13bce4f97399c7105f4.tar.gz |
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 <aliguori@us.ibm.com>
Diffstat (limited to 'hw/gt64xxx.c')
-rw-r--r-- | hw/gt64xxx.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c index 9fc51f2..79d2dfb 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); } |