From 1894839f86f58c497f48fe8f5d1e6ce1df3b5894 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Tue, 29 Sep 2009 22:48:30 +0200 Subject: vmstate: create VMSTATE_I2C_SLAVE Signed-off-by: Juan Quintela Signed-off-by: Anthony Liguori --- hw/hw.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'hw/hw.h') diff --git a/hw/hw.h b/hw/hw.h index 2d86389..3796457 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -440,6 +440,17 @@ extern const VMStateDescription vmstate_pci_device; + type_check(PCIDevice,typeof_field(_state, _field)) \ } +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 = offsetof(_state, _field) \ + + type_check(i2c_slave,typeof_field(_state, _field)) \ +} + /* _f : field name _f_n : num of elements field_name _n : num of elements -- cgit v1.1