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/highbank.c | |
parent | 40021f08882aaef93c66c8c740087b6d3031b63a (diff) | |
download | qemu-999e12bbe85c5dcf49bef13bce4f97399c7105f4.zip qemu-999e12bbe85c5dcf49bef13bce4f97399c7105f4.tar.gz qemu-999e12bbe85c5dcf49bef13bce4f97399c7105f4.tar.bz2 |
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/highbank.c')
-rw-r--r-- | hw/highbank.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/hw/highbank.c b/hw/highbank.c index 136297c..9f76716 100644 --- a/hw/highbank.c +++ b/hw/highbank.c @@ -159,18 +159,25 @@ static int highbank_regs_init(SysBusDevice *dev) return 0; } -static SysBusDeviceInfo highbank_regs_info = { - .init = highbank_regs_init, - .qdev.name = "highbank-regs", - .qdev.desc = "Calxeda Highbank registers", - .qdev.size = sizeof(HighbankRegsState), - .qdev.vmsd = &vmstate_highbank_regs, - .qdev.reset = highbank_regs_reset, +static void highbank_regs_class_init(ObjectClass *klass, void *data) +{ + SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass); + + sbc->init = highbank_regs_init; +} + +static DeviceInfo highbank_regs_info = { + .name = "highbank-regs", + .desc = "Calxeda Highbank registers", + .size = sizeof(HighbankRegsState), + .vmsd = &vmstate_highbank_regs, + .class_init = highbank_regs_class_init, + .reset = highbank_regs_reset, }; static void highbank_regs_register_device(void) { - sysbus_register_withprop(&highbank_regs_info); + sysbus_qdev_register(&highbank_regs_info); } device_init(highbank_regs_register_device) |