mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
qbus: Rename qbus_create_inplace() to qbus_init()
Rename qbus_create_inplace() to qbus_init(); this is more in line with our usual naming convention for functions that in-place initialize objects. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 20210923121153.23754-5-peter.maydell@linaro.org
This commit is contained in:
parent
8d4cdf01f8
commit
d637e1dc6d
32 changed files with 54 additions and 61 deletions
|
@ -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));
|
||||
BusClass *bc;
|
||||
|
@ -151,11 +152,11 @@ static void bus_unparent(Object *obj)
|
|||
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);
|
||||
qbus_init(bus, parent, name);
|
||||
qbus_init_internal(bus, parent, 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;
|
||||
|
||||
bus = BUS(object_new(typename));
|
||||
qbus_init(bus, parent, name);
|
||||
qbus_init_internal(bus, parent, name);
|
||||
|
||||
return bus;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue