Skip to content

Commit

Permalink
tmp105: update the register in post_load where it needs updating.
Browse files Browse the repository at this point in the history
This was the only user of .post_save as noticed by Jan Kiszka and
seems to have been added there wrongly during conversion to
VMStateDescription.

Signed-off-by: Andrzej Zaborowski <balrogg@gmail.com>
  • Loading branch information
balrog-kun committed May 15, 2010
1 parent 26a8233 commit e5d3b98
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions hw/tmp105.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,12 @@ static void tmp105_event(i2c_slave *i2c, enum i2c_event event)
s->len = 0;
}

static void tmp105_post_save(void *opaque)
{
TMP105State *s = opaque;
s->faults = tmp105_faultq[(s->config >> 3) & 3]; /* F */
}

static int tmp105_post_load(void *opaque, int version_id)
{
TMP105State *s = opaque;

s->faults = tmp105_faultq[(s->config >> 3) & 3]; /* F */

tmp105_interrupt_update(s);
return 0;
}
Expand All @@ -192,7 +188,6 @@ static const VMStateDescription vmstate_tmp105 = {
.version_id = 0,
.minimum_version_id = 0,
.minimum_version_id_old = 0,
.post_save = tmp105_post_save,
.post_load = tmp105_post_load,
.fields = (VMStateField []) {
VMSTATE_UINT8(len, TMP105State),
Expand Down

0 comments on commit e5d3b98

Please sign in to comment.