diff options
Diffstat (limited to 'hw/input/lasips2.c')
-rw-r--r-- | hw/input/lasips2.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c index 81beb5b614..49405191cb 100644 --- a/hw/input/lasips2.c +++ b/hw/input/lasips2.c @@ -256,13 +256,17 @@ LASIPS2State *lasips2_initfn(hwaddr base, qemu_irq irq) s = LASIPS2(dev); s->irq = irq; + return s; +} + +static void lasips2_realize(DeviceState *dev, Error **errp) +{ + LASIPS2State *s = LASIPS2(dev); - vmstate_register(NULL, base, &vmstate_lasips2, s); + vmstate_register(NULL, s->base, &vmstate_lasips2, s); s->kbd.dev = ps2_kbd_init(lasips2_port_set_irq, &s->kbd); s->mouse.dev = ps2_mouse_init(lasips2_port_set_irq, &s->mouse); - - return s; } static void lasips2_init(Object *obj) @@ -292,6 +296,7 @@ static void lasips2_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); + dc->realize = lasips2_realize; device_class_set_props(dc, lasips2_properties); set_bit(DEVICE_CATEGORY_INPUT, dc->categories); } |