aboutsummaryrefslogtreecommitdiff
path: root/hw/input
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-10-20 11:07:20 +0200
committerJuan Quintela <quintela@redhat.com>2023-11-01 16:13:58 +0100
commit99b16e8ee4789432cc543fde45902796385713c0 (patch)
tree1b2344f95efa0ff7cea5727c6e2990044c95bf0a /hw/input
parent71daf640d91d49a784ead059c9021070a2107008 (diff)
downloadqemu-99b16e8ee4789432cc543fde45902796385713c0.zip
qemu-99b16e8ee4789432cc543fde45902796385713c0.tar.gz
qemu-99b16e8ee4789432cc543fde45902796385713c0.tar.bz2
migration: Use vmstate_register_any()
This are the easiest cases, where we were already using VMSTATE_INSTANCE_ID_ANY. Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231020090731.28701-3-quintela@redhat.com>
Diffstat (limited to 'hw/input')
-rw-r--r--hw/input/adb.c2
-rw-r--r--hw/input/ads7846.c2
-rw-r--r--hw/input/stellaris_input.c3
3 files changed, 3 insertions, 4 deletions
diff --git a/hw/input/adb.c b/hw/input/adb.c
index 214ae6f..8aed0da 100644
--- a/hw/input/adb.c
+++ b/hw/input/adb.c
@@ -247,7 +247,7 @@ static void adb_bus_realize(BusState *qbus, Error **errp)
adb_bus->autopoll_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, adb_autopoll,
adb_bus);
- vmstate_register(NULL, -1, &vmstate_adb_bus, adb_bus);
+ vmstate_register_any(NULL, &vmstate_adb_bus, adb_bus);
}
static void adb_bus_unrealize(BusState *qbus)
diff --git a/hw/input/ads7846.c b/hw/input/ads7846.c
index dc0998a..91116c6 100644
--- a/hw/input/ads7846.c
+++ b/hw/input/ads7846.c
@@ -158,7 +158,7 @@ static void ads7846_realize(SSIPeripheral *d, Error **errp)
ads7846_int_update(s);
- vmstate_register(NULL, VMSTATE_INSTANCE_ID_ANY, &vmstate_ads7846, s);
+ vmstate_register_any(NULL, &vmstate_ads7846, s);
}
static void ads7846_class_init(ObjectClass *klass, void *data)
diff --git a/hw/input/stellaris_input.c b/hw/input/stellaris_input.c
index e6ee5e1..a58721c 100644
--- a/hw/input/stellaris_input.c
+++ b/hw/input/stellaris_input.c
@@ -88,6 +88,5 @@ void stellaris_gamepad_init(int n, qemu_irq *irq, const int *keycode)
}
s->num_buttons = n;
qemu_add_kbd_event_handler(stellaris_gamepad_put_key, s);
- vmstate_register(NULL, VMSTATE_INSTANCE_ID_ANY,
- &vmstate_stellaris_gamepad, s);
+ vmstate_register_any(NULL, &vmstate_stellaris_gamepad, s);
}