aboutsummaryrefslogtreecommitdiff
path: root/hw/tsc210x.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-02 19:14:17 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-02 19:14:17 +0000
commitb6c4f71f508977fedc11f5c822642a5bb1c899a3 (patch)
treec15fe04b63c822a16d62af197d12450286f6f390 /hw/tsc210x.c
parent09bc878a13c1ca1c5d2400db5657ea7d04fe26bc (diff)
Resurrect the safe part of r5274
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5401 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/tsc210x.c')
-rw-r--r--hw/tsc210x.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/tsc210x.c b/hw/tsc210x.c
index 97c21ef026..61e101d628 100644
--- a/hw/tsc210x.c
+++ b/hw/tsc210x.c
@@ -1046,8 +1046,8 @@ static void tsc210x_save(QEMUFile *f, void *opaque)
qemu_put_be16s(f, &s->pll[0]);
qemu_put_be16s(f, &s->pll[1]);
qemu_put_be16s(f, &s->volume);
- qemu_put_be64(f, (uint64_t) (s->volume_change - now));
- qemu_put_be64(f, (uint64_t) (s->powerdown - now));
+ qemu_put_sbe64(f, (s->volume_change - now));
+ qemu_put_sbe64(f, (s->powerdown - now));
qemu_put_byte(f, s->softstep);
qemu_put_be16s(f, &s->dac_power);
@@ -1092,8 +1092,8 @@ static int tsc210x_load(QEMUFile *f, void *opaque, int version_id)
qemu_get_be16s(f, &s->pll[0]);
qemu_get_be16s(f, &s->pll[1]);
qemu_get_be16s(f, &s->volume);
- s->volume_change = (int64_t) qemu_get_be64(f) + now;
- s->powerdown = (int64_t) qemu_get_be64(f) + now;
+ s->volume_change = qemu_get_sbe64(f) + now;
+ s->powerdown = qemu_get_sbe64(f) + now;
s->softstep = qemu_get_byte(f);
qemu_get_be16s(f, &s->dac_power);