stellaris_input: Fix vmstate description of buttons field
commit372e458ebc41c980d4fa23e3234a5222813cd405
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 26 Jul 2019 14:40:28 +0000 (26 15:40 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 26 Jul 2019 15:17:56 +0000 (26 16:17 +0100)
treef066fbca8a73f10f0efb3fd7d5dcc0256a1ef48b
parent830fc739d05b87b547ae281435335b366a279e20
stellaris_input: Fix vmstate description of buttons field

gamepad_state::buttons is a pointer to an array of structs,
not an array of structs, so should be declared in the vmstate
with VMSTATE_STRUCT_VARRAY_POINTER_INT32; otherwise we
corrupt memory on incoming migration.

We bump the vmstate version field as the easiest way to
deal with the migration break, since migration wouldn't have
worked reliably before anyway.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>
Message-id: 20190725163710.11703-2-peter.maydell@linaro.org
hw/input/stellaris_input.c