summaryrefslogtreecommitdiff
path: root/hw/rtl8139.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/rtl8139.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/rtl8139.c')
-rw-r--r--hw/rtl8139.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index d2a9443982..9fd05a8a1b 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -3300,7 +3300,6 @@ static int pci_rtl8139_uninit(PCIDevice *dev)
qemu_del_timer(s->timer);
qemu_free_timer(s->timer);
#endif
- vmstate_unregister(&vmstate_rtl8139, s);
qemu_del_vlan_client(&s->nic->nc);
return 0;
}
@@ -3348,8 +3347,6 @@ static int pci_rtl8139_init(PCIDevice *dev)
s->cplus_txbuffer_len = 0;
s->cplus_txbuffer_offset = 0;
- vmstate_register(-1, &vmstate_rtl8139, s);
-
#ifdef RTL8139_ONBOARD_TIMER
s->timer = qemu_new_timer(vm_clock, rtl8139_timer, s);
@@ -3371,6 +3368,7 @@ static PCIDeviceInfo rtl8139_info = {
.qdev.name = "rtl8139",
.qdev.size = sizeof(RTL8139State),
.qdev.reset = rtl8139_reset,
+ .qdev.vmsd = &vmstate_rtl8139,
.init = pci_rtl8139_init,
.exit = pci_rtl8139_uninit,
.qdev.props = (Property[]) {