aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/core/sysbus.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c
index ecfb0cfc0e..3c8e53b188 100644
--- a/hw/core/sysbus.c
+++ b/hw/core/sysbus.c
@@ -376,6 +376,14 @@ BusState *sysbus_get_default(void)
return main_system_bus;
}
+void sysbus_init_child_obj(Object *parent, const char *childname, void *child,
+ size_t childsize, const char *childtype)
+{
+ object_initialize_child(parent, childname, child, childsize, childtype,
+ &error_abort, NULL);
+ qdev_set_parent_bus(DEVICE(child), sysbus_get_default());
+}
+
static void sysbus_register_types(void)
{
type_register_static(&system_bus_info);