]> git.proxmox.com Git - mirror_qemu.git/commitdiff
migration: Use vmstate_register_any() for eeprom93xx
authorJuan Quintela <quintela@redhat.com>
Fri, 20 Oct 2023 09:07:30 +0000 (11:07 +0200)
committerJuan Quintela <quintela@redhat.com>
Wed, 1 Nov 2023 15:13:58 +0000 (16:13 +0100)
We can have more than one eeprom93xx.
For instance:

e100_nic_realize() -> eeprom93xx_new()

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231020090731.28701-13-quintela@redhat.com>

hw/nvram/eeprom93xx.c

index 1081e2cc0d27a4e530ca344cdfaa5f0c141d78f6..57d63638d77a53a784102ccc2991164a4ffc8a6e 100644 (file)
@@ -321,7 +321,7 @@ eeprom_t *eeprom93xx_new(DeviceState *dev, 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(VMSTATE_IF(dev), 0, &vmstate_eeprom, eeprom);
+    vmstate_register_any(VMSTATE_IF(dev), &vmstate_eeprom, eeprom);
     return eeprom;
 }