|
@@ -99,7 +99,8 @@ static void bus_reset_child_foreach(Object *obj, ResettableChildCallback cb,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-static void qbus_init(BusState *bus, DeviceState *parent, const char *name)
|
|
|
|
|
|
+static void qbus_init_internal(BusState *bus, DeviceState *parent,
|
|
|
|
+ const char *name)
|
|
{
|
|
{
|
|
const char *typename = object_get_typename(OBJECT(bus));
|
|
const char *typename = object_get_typename(OBJECT(bus));
|
|
BusClass *bc;
|
|
BusClass *bc;
|
|
@@ -151,11 +152,11 @@ static void bus_unparent(Object *obj)
|
|
bus->parent = NULL;
|
|
bus->parent = NULL;
|
|
}
|
|
}
|
|
|
|
|
|
-void qbus_create_inplace(void *bus, size_t size, const char *typename,
|
|
|
|
- DeviceState *parent, const char *name)
|
|
|
|
|
|
+void qbus_init(void *bus, size_t size, const char *typename,
|
|
|
|
+ DeviceState *parent, const char *name)
|
|
{
|
|
{
|
|
object_initialize(bus, size, typename);
|
|
object_initialize(bus, size, typename);
|
|
- qbus_init(bus, parent, name);
|
|
|
|
|
|
+ qbus_init_internal(bus, parent, name);
|
|
}
|
|
}
|
|
|
|
|
|
BusState *qbus_create(const char *typename, DeviceState *parent, const char *name)
|
|
BusState *qbus_create(const char *typename, DeviceState *parent, const char *name)
|
|
@@ -163,7 +164,7 @@ BusState *qbus_create(const char *typename, DeviceState *parent, const char *nam
|
|
BusState *bus;
|
|
BusState *bus;
|
|
|
|
|
|
bus = BUS(object_new(typename));
|
|
bus = BUS(object_new(typename));
|
|
- qbus_init(bus, parent, name);
|
|
|
|
|
|
+ qbus_init_internal(bus, parent, name);
|
|
|
|
|
|
return bus;
|
|
return bus;
|
|
}
|
|
}
|