Patchwork [1/6] tmp105: Drop unused faults field

login
register
mail settings
Submitter Jan Kiszka
Date May 12, 2010, 9:19 p.m.
Message ID <02f0ce8d2d7f9555cb8088b6c803023c0eb4b636.1273699147.git.jan.kiszka@web.de>
Download mbox | patch
Permalink /patch/52429/
State New
Headers show

Comments

Jan Kiszka - May 12, 2010, 9:19 p.m.
From: Jan Kiszka <jan.kiszka@siemens.com>

It was only written, but never read.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
CC: Andrzej Zaborowski <balrogg@gmail.com>
---
 hw/tmp105.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

Patch

diff --git a/hw/tmp105.c b/hw/tmp105.c
index 8343aff..cac5f2b 100644
--- a/hw/tmp105.c
+++ b/hw/tmp105.c
@@ -31,7 +31,6 @@  typedef struct {
     uint8_t config;
     int16_t temperature;
     int16_t limit[2];
-    int faults;
     uint8_t alarm;
 } TMP105State;
 
@@ -124,7 +123,6 @@  static void tmp105_write(TMP105State *s)
         if (s->buf[0] & ~s->config & (1 << 0))			/* SD */
             printf("%s: TMP105 shutdown\n", __FUNCTION__);
         s->config = s->buf[0];
-        s->faults = tmp105_faultq[(s->config >> 3) & 3];	/* F */
         tmp105_alarm_update(s);
         break;
 
@@ -173,12 +171,6 @@  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;
@@ -192,7 +184,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),
@@ -214,7 +205,6 @@  static void tmp105_reset(i2c_slave *i2c)
     s->temperature = 0;
     s->pointer = 0;
     s->config = 0;
-    s->faults = tmp105_faultq[(s->config >> 3) & 3];
     s->alarm = 0;
 
     tmp105_interrupt_update(s);