i2c:smbus_eeprom: Add vmstate handling to the smbus eeprom
commitfd9df33f0829fd93d02f48fe650be057f8d52dfd
authorCorey Minyard <cminyard@mvista.com>
Thu, 7 Dec 2017 21:40:53 +0000 (7 15:40 -0600)
committerCorey Minyard <cminyard@mvista.com>
Thu, 28 Feb 2019 03:06:08 +0000 (27 21:06 -0600)
tree8f804a6388fca7d041d4901a46b8a78a5f184cc9
parent0cf487e5bd802fccb7db9d47fdf3dad15deb273e
i2c:smbus_eeprom: Add vmstate handling to the smbus eeprom

Transfer the state of the EEPROM on a migration.  This way the
data remains consistent on migration.

This required moving the actual data to a separate array and
using the data provided in the init function as a separate
initialization array, since a pointer property has to be a
void * and the array needs to be uint8_t[].

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
hw/i2c/smbus_eeprom.c