aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-09-29 22:48:23 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:37 -0500
commitdb596c53a1e67f5e239de5fc91f9a29fbd9236c6 (patch)
tree167960ffafd1e2c5adaff7a38345b410f7efa5ab /hw
parentd4bfa4d7c6e53f03df49f2dfc3fa87d5e18218dd (diff)
vmstate: remove ps2_kbd_load_old()
Now that we have version_id on post_load() we don't need the old load function Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/ps2.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/hw/ps2.c b/hw/ps2.c
index fff4d13881..0644e01c49 100644
--- a/hw/ps2.c
+++ b/hw/ps2.c
@@ -541,19 +541,11 @@ static const VMStateDescription vmstate_ps2_common = {
}
};
-static int ps2_kbd_load_old(QEMUFile* f, void* opaque, int version_id)
+static int ps2_kbd_post_load(void* opaque, int version_id)
{
PS2KbdState *s = (PS2KbdState*)opaque;
- if (version_id != 2 && version_id != 3)
- return -EINVAL;
-
- vmstate_load_state(f, &vmstate_ps2_common, &s->common, version_id);
- s->scan_enabled=qemu_get_be32(f);
- s->translate=qemu_get_be32(f);
- if (version_id == 3)
- s->scancode_set=qemu_get_be32(f);
- else
+ if (version_id == 2)
s->scancode_set=2;
return 0;
}
@@ -561,9 +553,9 @@ static int ps2_kbd_load_old(QEMUFile* f, void* opaque, int version_id)
static const VMStateDescription vmstate_ps2_keyboard = {
.name = "ps2kbd",
.version_id = 3,
- .minimum_version_id = 3,
+ .minimum_version_id = 2,
.minimum_version_id_old = 2,
- .load_state_old = ps2_kbd_load_old,
+ .post_load = ps2_kbd_post_load,
.fields = (VMStateField []) {
VMSTATE_STRUCT(common, PS2KbdState, 0, vmstate_ps2_common, PS2State),
VMSTATE_INT32(scan_enabled, PS2KbdState),