aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/qdev.c')
-rw-r--r--hw/qdev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index 675248fc12..6451b8a6d7 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -221,12 +221,18 @@ int qdev_init(DeviceState *dev)
return rc;
if (dev->info->reset)
qemu_register_reset(dev->info->reset, dev);
+ if (dev->info->vmsd)
+ vmstate_register(-1, dev->info->vmsd, dev);
return 0;
}
/* Unlink device from bus and free the structure. */
void qdev_free(DeviceState *dev)
{
+#if 0 /* FIXME: need sane vmstate_unregister function */
+ if (dev->info->vmsd)
+ vmstate_unregister(dev->info->vmsd, dev);
+#endif
if (dev->info->reset)
qemu_unregister_reset(dev->info->reset, dev);
LIST_REMOVE(dev, sibling);