Since PS2_MOUSE_DEVICE is a qdev device then vmstate_ps2_mouse can be registered
using the DeviceClass vmsd field instead. There is no need to use
qdev_set_legacy_instance_id() to ensure migration compatibility since the first 2
parameters to vmstate_register() are NULL and 0 respectively.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <
20220624134109.881989-14-mark.cave-ayland@ilande.co.uk>
trace_ps2_mouse_init(s);
ps2->update_irq = update_irq;
ps2->update_arg = update_arg;
- vmstate_register(NULL, 0, &vmstate_ps2_mouse, s);
return s;
}
dc->realize = ps2_mouse_realize;
device_class_set_parent_reset(dc, ps2_mouse_reset,
&ps2dc->parent_reset);
+ dc->vmsd = &vmstate_ps2_mouse;
}
static const TypeInfo ps2_mouse_info = {