diff options
author | xiaoqiang zhao <zxq_yx_007@163.com> | 2013-11-05 18:16:03 +0800 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-12-24 18:02:18 +0100 |
commit | ff6986ce618c69f988e4419efd67ea5cbf7792a5 (patch) | |
tree | 016383bf01308755c11212c2be849baea9415f74 /hw/xen | |
parent | d3b0c9e90a9853984c60478dae45bedf8aadf42a (diff) |
apic: QOM'ify APIC
Convert 'init' function to QOM's 'realize' for apic, kvm/apic and
xen/xen_apic.
Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/xen')
-rw-r--r-- | hw/xen/xen_apic.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/xen/xen_apic.c b/hw/xen/xen_apic.c index 9f91e0f0c9..63bb7f77c6 100644 --- a/hw/xen/xen_apic.c +++ b/hw/xen/xen_apic.c @@ -36,8 +36,10 @@ static const MemoryRegionOps xen_apic_io_ops = { .endianness = DEVICE_NATIVE_ENDIAN, }; -static void xen_apic_init(APICCommonState *s) +static void xen_apic_realize(DeviceState *dev, Error **errp) { + APICCommonState *s = APIC_COMMON(dev); + memory_region_init_io(&s->io_memory, OBJECT(s), &xen_apic_io_ops, s, "xen-apic-msi", APIC_SPACE_SIZE); @@ -72,7 +74,7 @@ static void xen_apic_class_init(ObjectClass *klass, void *data) { APICCommonClass *k = APIC_COMMON_CLASS(klass); - k->init = xen_apic_init; + k->realize = xen_apic_realize; k->set_base = xen_apic_set_base; k->set_tpr = xen_apic_set_tpr; k->get_tpr = xen_apic_get_tpr; |