From 17b8013acbfacdbb5906719b4df54c362ef182af Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Tue, 12 Jul 2022 22:52:23 +0100 Subject: [PATCH] lasips2: don't use vmstate_register() in lasips2_realize() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é --- hw/input/lasips2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c index 9223cb0af4..d4fa248729 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); }