diff options
author | Andreas Färber <afaerber@suse.de> | 2013-04-27 22:18:40 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-04-29 08:27:47 -0500 |
commit | 29bb5317cb7b23422b2612025d56055bbf0bbd02 (patch) | |
tree | aaa01076cc271286ac563c63310e5fdd2ee38ee0 /hw/intc/i8259_common.c | |
parent | eb1440e7ec522784f4351bb5e88436cc3cd9abd7 (diff) | |
download | qemu-29bb5317cb7b23422b2612025d56055bbf0bbd02.zip qemu-29bb5317cb7b23422b2612025d56055bbf0bbd02.tar.gz qemu-29bb5317cb7b23422b2612025d56055bbf0bbd02.tar.bz2 |
i8259: QOM cleanups
Eliminate DO_UPCAST() for PICCommonState. Prepares for ISA realizefn.
Also give the i8259_common type registration functions unique names
while at it.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1367093935-29091-6-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/intc/i8259_common.c')
-rw-r--r-- | hw/intc/i8259_common.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/intc/i8259_common.c b/hw/intc/i8259_common.c index 996ba9d..c2ba6a5 100644 --- a/hw/intc/i8259_common.c +++ b/hw/intc/i8259_common.c @@ -68,7 +68,7 @@ static int pic_dispatch_post_load(void *opaque, int version_id) static int pic_init_common(ISADevice *dev) { - PICCommonState *s = DO_UPCAST(PICCommonState, dev, dev); + PICCommonState *s = PIC_COMMON(dev); PICCommonClass *info = PIC_COMMON_GET_CLASS(s); info->init(s); @@ -78,7 +78,7 @@ static int pic_init_common(ISADevice *dev) isa_register_ioport(NULL, &s->elcr_io, s->elcr_addr); } - qdev_set_legacy_instance_id(&s->dev.qdev, s->iobase, 1); + qdev_set_legacy_instance_id(DEVICE(dev), s->iobase, 1); return 0; } @@ -153,9 +153,9 @@ static const TypeInfo pic_common_type = { .abstract = true, }; -static void register_types(void) +static void pic_common_register_types(void) { type_register_static(&pic_common_type); } -type_init(register_types); +type_init(pic_common_register_types) |