summaryrefslogtreecommitdiff
path: root/hw/qdev.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-09-25 21:42:35 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:48 -0500
commitdb38a02efffb851189182e3135dfcd2fb6f0159c (patch)
tree48038e49e6c211226a7dfaab7f349ebf4ecf0d23 /hw/qdev.c
parent20a0ea888120aaaaf3f19d29edc6def51de27008 (diff)
downloadqemu-db38a02efffb851189182e3135dfcd2fb6f0159c.tar.gz
qemu-db38a02efffb851189182e3135dfcd2fb6f0159c.tar.bz2
qemu-db38a02efffb851189182e3135dfcd2fb6f0159c.zip
Add exit callback to DeviceInfo.
This adds a exit callback for device destruction to DeviceInfo, so we can hook cleanups into qdev device destruction. Followup patches will put that into use. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev.c')
-rw-r--r--hw/qdev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index 7b204f9517..064389dcd0 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -245,6 +245,8 @@ void qdev_free(DeviceState *dev)
#endif
if (dev->info->reset)
qemu_unregister_reset(dev->info->reset, dev);
+ if (dev->info->exit)
+ dev->info->exit(dev);
}
QLIST_REMOVE(dev, sibling);
qemu_free(dev);