From: Mark Cave-Ayland Date: Tue, 12 Jul 2022 21:52:23 +0000 (+0100) Subject: lasips2: don't use vmstate_register() in lasips2_realize() X-Git-Tag: v7.1.0-rc0~14^2~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=17b8013acbfacdbb5906719b4df54c362ef182af;p=thirdparty%2Fqemu.git lasips2: don't use vmstate_register() in lasips2_realize() Since lasips2 is a qdev device then vmstate_ps2_mouse can be registered using the DeviceClass vmsd field instead. Note that due to the use of the base parameter in the original vmstate_register() function call, this is actually a migration break for the HPPA B160L machine. Signed-off-by: Mark Cave-Ayland Tested-by: Helge Deller Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id: <20220712215251.7944-13-mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé --- diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c index 9223cb0af40..d4fa248729f 100644 --- a/hw/input/lasips2.c +++ b/hw/input/lasips2.c @@ -272,8 +272,6 @@ static void lasips2_realize(DeviceState *dev, Error **errp) { LASIPS2State *s = LASIPS2(dev); - vmstate_register(NULL, s->base, &vmstate_lasips2, s); - s->kbd.dev = ps2_kbd_init(); qdev_connect_gpio_out(DEVICE(s->kbd.dev), PS2_DEVICE_IRQ, qdev_get_gpio_in_named(dev, "ps2-kbd-input-irq", @@ -319,6 +317,7 @@ static void lasips2_class_init(ObjectClass *klass, void *data) DeviceClass *dc = DEVICE_CLASS(klass); dc->realize = lasips2_realize; + dc->vmsd = &vmstate_lasips2; device_class_set_props(dc, lasips2_properties); set_bit(DEVICE_CATEGORY_INPUT, dc->categories); }