aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2014-09-26 09:28:21 +0000
committerAndreas Färber <afaerber@suse.de>2014-10-15 05:03:13 +0200
commit014176f914ab8e41a88225e8f26569ef0e0bf223 (patch)
treef235d260f9730c6a7d007d33bdaa9575deba8370 /hw
parent181a2c63236966b3c80eef131bac33a355a492da (diff)
qdev: Add simple/generic unplug callback for HotplugHandler
It will be used in shallow conversion from legacy hotplug mechanism and eventually replace all the uses of old mechanism DeviceClass::unplug = qdev_simple_unplug_cb() Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw')
-rw-r--r--hw/core/qdev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 6479194498..9f18520219 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -286,6 +286,11 @@ int qdev_simple_unplug_cb(DeviceState *dev)
return 0;
}
+void qdev_simple_device_unplug_cb(HotplugHandler *hotplug_dev,
+ DeviceState *dev, Error **errp)
+{
+ qdev_simple_unplug_cb(dev);
+}
/* Like qdev_init(), but terminate program via error_report() instead of
returning an error value. This is okay during machine creation.