aboutsummaryrefslogtreecommitdiffstats
path: root/hw/pcnet.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-12-02 12:36:46 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-03 10:05:58 -0600
commitbe73cfe2be9a41de4f97e4847b3f12a7d6d61159 (patch)
tree83419da906307e90aea6146c88f405aeeb32cf7d /hw/pcnet.c
parent70cca6d87261f3ab330e2be34fbe9596b13342ae (diff)
savevm: Port to qdev.vmsd all devices that have qdev
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pcnet.c')
-rw-r--r--hw/pcnet.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/pcnet.c b/hw/pcnet.c
index 195c825c8..138fbc6d0 100644
--- a/hw/pcnet.c
+++ b/hw/pcnet.c
@@ -1952,7 +1952,6 @@ static int pci_pcnet_uninit(PCIDevice *dev)
PCIPCNetState *d = DO_UPCAST(PCIPCNetState, pci_dev, dev);
cpu_unregister_io_memory(d->state.mmio_index);
- vmstate_unregister(&vmstate_pci_pcnet, d);
qemu_del_timer(d->state.poll_timer);
qemu_free_timer(d->state.poll_timer);
qemu_del_vlan_client(&d->state.nic->nc);
@@ -2010,8 +2009,6 @@ static int pci_pcnet_init(PCIDevice *pci_dev)
s->phys_mem_read = pci_physical_memory_read;
s->phys_mem_write = pci_physical_memory_write;
- vmstate_register(-1, &vmstate_pci_pcnet, d);
-
if (!pci_dev->qdev.hotplugged) {
static int loaded = 0;
if (!loaded) {
@@ -2034,6 +2031,7 @@ static PCIDeviceInfo pcnet_info = {
.qdev.name = "pcnet",
.qdev.size = sizeof(PCIPCNetState),
.qdev.reset = pci_reset,
+ .qdev.vmsd = &vmstate_pci_pcnet,
.init = pci_pcnet_init,
.exit = pci_pcnet_uninit,
.qdev.props = (Property[]) {