aboutsummaryrefslogtreecommitdiff
path: root/hw/char/serial-isa.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/char/serial-isa.c')
-rw-r--r--hw/char/serial-isa.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/char/serial-isa.c b/hw/char/serial-isa.c
index 9e31c51..9a5928b 100644
--- a/hw/char/serial-isa.c
+++ b/hw/char/serial-isa.c
@@ -111,10 +111,19 @@ static void serial_isa_class_initfn(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
}
+static void serial_isa_initfn(Object *o)
+{
+ ISASerialState *self = ISA_SERIAL(o);
+
+ object_initialize_child(o, "serial", &self->state, sizeof(self->state),
+ TYPE_SERIAL, &error_abort, NULL);
+}
+
static const TypeInfo serial_isa_info = {
.name = TYPE_ISA_SERIAL,
.parent = TYPE_ISA_DEVICE,
.instance_size = sizeof(ISASerialState),
+ .instance_init = serial_isa_initfn,
.class_init = serial_isa_class_initfn,
};