diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-09-25 21:42:35 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-05 09:32:48 -0500 |
commit | d29275f10382844e000ddaafaddc6780555e8d83 (patch) | |
tree | 48038e49e6c211226a7dfaab7f349ebf4ecf0d23 /hw/qdev.c | |
parent | 131ec1bd7de661f20f178f582430a9d0d0cfa9b4 (diff) |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |