summaryrefslogtreecommitdiffstats
path: root/hw/eeprom93xx.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2010-06-25 11:09:21 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2010-07-06 10:36:28 -0500
commit5fce2b3e46b697230996568e1fed39d02a6bedb2 (patch)
treee3509a473032f8a4192e245fe47f6ce1195c2dbb /hw/eeprom93xx.c
parent7685ee6abcb939104801f84b3fe9645412528088 (diff)
downloadhqemu-5fce2b3e46b697230996568e1fed39d02a6bedb2.zip
hqemu-5fce2b3e46b697230996568e1fed39d02a6bedb2.tar.gz
eepro100: Add a dev field to eeprom new/free functions
This allows us to create a more meaningful savevm string. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/eeprom93xx.c')
-rw-r--r--hw/eeprom93xx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/eeprom93xx.c b/hw/eeprom93xx.c
index 6ba546f..660b28f 100644
--- a/hw/eeprom93xx.c
+++ b/hw/eeprom93xx.c
@@ -289,7 +289,7 @@ void eeprom93xx_reset(eeprom_t *eeprom)
}
#endif
-eeprom_t *eeprom93xx_new(uint16_t nwords)
+eeprom_t *eeprom93xx_new(DeviceState *dev, uint16_t nwords)
{
/* Add a new EEPROM (with 16, 64 or 256 words). */
eeprom_t *eeprom;
@@ -316,15 +316,15 @@ eeprom_t *eeprom93xx_new(uint16_t nwords)
/* Output DO is tristate, read results in 1. */
eeprom->eedo = 1;
logout("eeprom = 0x%p, nwords = %u\n", eeprom, nwords);
- vmstate_register(NULL, 0, &vmstate_eeprom, eeprom);
+ vmstate_register(dev, 0, &vmstate_eeprom, eeprom);
return eeprom;
}
-void eeprom93xx_free(eeprom_t *eeprom)
+void eeprom93xx_free(DeviceState *dev, eeprom_t *eeprom)
{
/* Destroy EEPROM. */
logout("eeprom = 0x%p\n", eeprom);
- vmstate_unregister(NULL, &vmstate_eeprom, eeprom);
+ vmstate_unregister(dev, &vmstate_eeprom, eeprom);
qemu_free(eeprom);
}
OpenPOWER on IntegriCloud