aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2018-06-07 18:17:51 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2018-06-12 10:44:36 +1000
commit3431bdf5a3c3bd732f78b0433471c2b1cb373564 (patch)
tree408b53196a49057540c38fa70169302a3d6a8c76 /hw
parentd638fd5c9681dbb8915147365520888c64f39dac (diff)
mos6522: convert VMSTATE_TIMER_PTR_TEST to VMSTATE_TIMER_PTR
The timers are configured in the mos6522 init function and therefore will always exist, so the function can never return false. Peter also pointed out that this is the only remaining user of VMSTATE_TIMER_PTR_TEST in the codebase, so we might as well just convert it over to VMSTATE_TIMER_PTR and remove mos6522_timer_exist() as it is no longer required. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r--hw/misc/mos6522.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c
index 2f58b9707f..44eb306cf1 100644
--- a/hw/misc/mos6522.c
+++ b/hw/misc/mos6522.c
@@ -369,13 +369,6 @@ static const MemoryRegionOps mos6522_ops = {
},
};
-static bool mos6522_timer_exist(void *opaque, int version_id)
-{
- MOS6522Timer *s = opaque;
-
- return s->timer != NULL;
-}
-
static const VMStateDescription vmstate_mos6522_timer = {
.name = "mos6522_timer",
.version_id = 0,
@@ -385,7 +378,7 @@ static const VMStateDescription vmstate_mos6522_timer = {
VMSTATE_UINT16(counter_value, MOS6522Timer),
VMSTATE_INT64(load_time, MOS6522Timer),
VMSTATE_INT64(next_irq_time, MOS6522Timer),
- VMSTATE_TIMER_PTR_TEST(timer, MOS6522Timer, mos6522_timer_exist),
+ VMSTATE_TIMER_PTR(timer, MOS6522Timer),
VMSTATE_END_OF_LIST()
}
};