[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/20] vmstate: create VMSTATE_I2C_SLAVE
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 06/20] vmstate: create VMSTATE_I2C_SLAVE |
Date: |
Fri, 11 Sep 2009 12:10:26 +0200 |
Signed-off-by: Juan Quintela <address@hidden>
---
hw/hw.h | 11 +++++++++++
hw/i2c.c | 2 +-
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index ac9d21d..b967670 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -428,6 +428,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
diff --git a/hw/i2c.c b/hw/i2c.c
index bdfe009..6e422a7 100644
--- a/hw/i2c.c
+++ b/hw/i2c.c
@@ -153,7 +153,7 @@ static int i2c_slave_post_load(void *opaque)
return 0;
}
-static const VMStateDescription vmstate_i2c_slave = {
+const VMStateDescription vmstate_i2c_slave = {
.name = "i2c_slave",
.version_id = 1,
.minimum_version_id = 1,
--
1.6.2.5
- [Qemu-devel] [PATCH 00/20] VMState: port all i2c devices, Juan Quintela, 2009/09/11
- [Qemu-devel] [PATCH 01/20] qdev: Add support for uint8_t, Juan Quintela, 2009/09/11
- [Qemu-devel] [PATCH 02/20] i2c: addresses are load/save as uint8_t values, change types to reflect this, Juan Quintela, 2009/09/11
- [Qemu-devel] [PATCH 03/20] vmstate: port i2c_bus device, Juan Quintela, 2009/09/11
- [Qemu-devel] [PATCH 05/20] vmstate: add uint8 array, Juan Quintela, 2009/09/11
- [Qemu-devel] [PATCH 04/20] vmstate: port i2c_slave device, Juan Quintela, 2009/09/11
- [Qemu-devel] [PATCH 06/20] vmstate: create VMSTATE_I2C_SLAVE,
Juan Quintela <=
- [Qemu-devel] [PATCH 09/20] vmstate: create VMSTATE_STRUCT_POINTER, Juan Quintela, 2009/09/11
- [Qemu-devel] [PATCH 07/20] vmstate: port wm8750 device, Juan Quintela, 2009/09/11
- [Qemu-devel] [PATCH 12/20] vmstate: create VMSTATE_INT16_ARRAY, Juan Quintela, 2009/09/11
- [Qemu-devel] [PATCH 08/20] vmstate: port max7310 device, Juan Quintela, 2009/09/11
- [Qemu-devel] [PATCH 10/20] vmstate: port pxa2xx_i2c device, Juan Quintela, 2009/09/11
- [Qemu-devel] [PATCH 13/20] tmp105: change len and alorm to uint8_t, Juan Quintela, 2009/09/11
- [Qemu-devel] [PATCH 14/20] vmstate: port wmp105 device, Juan Quintela, 2009/09/11
- [Qemu-devel] [PATCH 16/20] vmstate: port twl92230 device, Juan Quintela, 2009/09/11
- [Qemu-devel] [PATCH 17/20] vmstate: add support for arrays of pointers, Juan Quintela, 2009/09/11
- [Qemu-devel] [PATCH 19/20] vmstate: port lm832x device, Juan Quintela, 2009/09/11