From: Igor Mammedov Date: Fri, 26 Sep 2014 09:28:23 +0000 (+0000) Subject: qdev: Drop hotplug check from bus_add_child() X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~526^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e378acb4047fbec4f89031dbba7fb7851042f6ee;p=sdk%2Femulator%2Fqemu.git 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 Reviewed-by: Paolo Bonzini Signed-off-by: Andreas Färber --- diff --git a/hw/core/qdev.c b/hw/core/qdev.c index b1da409..6439a23 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -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));