diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2012-01-13 17:07:20 +0100 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-13 10:20:51 -0600 |
| commit | 701a8f76aa5243d90a71935982c20c06d8e83b80 (patch) | |
| tree | 0cd413bfa739326cb70b251d3ed2b698d0debb41 /hw/i2c.h | |
| parent | 49d4d9b63ebb0d487e80d3d85a75d8256d313df9 (diff) | |
| download | focaccia-qemu-701a8f76aa5243d90a71935982c20c06d8e83b80.tar.gz focaccia-qemu-701a8f76aa5243d90a71935982c20c06d8e83b80.zip | |
vmstate: extract declarations out of hw/hw.h
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/i2c.h')
| -rw-r--r-- | hw/i2c.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/i2c.h b/hw/i2c.h index 9381d01589..a3383ff025 100644 --- a/hw/i2c.h +++ b/hw/i2c.h @@ -74,4 +74,14 @@ void tmp105_set(i2c_slave *i2c, int temp); /* lm832x.c */ void lm832x_key_event(DeviceState *dev, int key, int state); +extern const VMStateDescription vmstate_i2c_slave; + +#define VMSTATE_I2C_SLAVE(_field, _state) { \ + .name = (stringify(_field)), \ + .size = sizeof(i2c_slave), \ + .vmsd = &vmstate_i2c_slave, \ + .flags = VMS_STRUCT, \ + .offset = vmstate_offset_value(_state, _field, i2c_slave), \ +} + #endif |