qdev: Drop hotplug check from bus_add_child()

Check is too restrictive and does not allow
to add children to just created bus during hotplug
when the bus is part of composite device.

Removing check from bus_add_child() doesn't affect
devices creatable with device_add/del commands since
they have a similar builtin check and patch will
allow to create complex composite devices during
hotplug.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
Igor Mammedov 2014-09-26 09:28:23 +00:00 committed by Andreas Färber
parent 431bbb26cb
commit e378acb404

View File

@ -85,10 +85,6 @@ static void bus_add_child(BusState *bus, DeviceState *child)
char name[32];
BusChild *kid = g_malloc0(sizeof(*kid));
if (qdev_hotplug) {
assert(qbus_is_hotpluggable(bus));
}
kid->index = bus->max_index++;
kid->child = child;
object_ref(OBJECT(kid->child));