aboutsummaryrefslogtreecommitdiff
path: root/hw/core/qdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/core/qdev.c')
-rw-r--r--hw/core/qdev.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 50336168f2..2131c7f951 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -378,35 +378,6 @@ void qdev_simple_device_unplug_cb(HotplugHandler *hotplug_dev,
/*
* Realize @dev.
- * Device properties should be set before calling this function. IRQs
- * and MMIO regions should be connected/mapped after calling this
- * function.
- * On failure, report an error with error_report() and terminate the
- * program. This is okay during machine creation. Don't use for
- * hotplug, because there callers need to recover from failure.
- * Exception: if you know the device's init() callback can't fail,
- * then qdev_init_nofail() can't fail either, and is therefore usable
- * even then. But relying on the device implementation that way is
- * somewhat unclean, and best avoided.
- */
-void qdev_init_nofail(DeviceState *dev)
-{
- Error *err = NULL;
-
- assert(!dev->realized);
-
- object_ref(OBJECT(dev));
- object_property_set_bool(OBJECT(dev), true, "realized", &err);
- if (err) {
- error_reportf_err(err, "Initialization of device %s failed: ",
- object_get_typename(OBJECT(dev)));
- exit(1);
- }
- object_unref(OBJECT(dev));
-}
-
-/*
- * Realize @dev.
* @dev must not be plugged into a bus.
* If @bus, plug @dev into @bus. This takes a reference to @dev.
* If @dev has no QOM parent, make one up, taking another reference.