From 915901599554b57e386ee4110efcd3c79b87a2cb Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 10 Jan 2020 19:30:17 +0400 Subject: qdev: move helper function to monitor/misc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the one-user function to the place it is being used. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200110153039.1379601-5-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- hw/core/qdev.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'hw/core/qdev.c') diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 60aec8b788..87086053a9 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -760,32 +760,6 @@ void qdev_alias_all_properties(DeviceState *target, Object *source) } while (class != object_class_by_name(TYPE_DEVICE)); } -static int qdev_add_hotpluggable_device(Object *obj, void *opaque) -{ - GSList **list = opaque; - DeviceState *dev = (DeviceState *)object_dynamic_cast(OBJECT(obj), - TYPE_DEVICE); - - if (dev == NULL) { - return 0; - } - - if (dev->realized && object_property_get_bool(obj, "hotpluggable", NULL)) { - *list = g_slist_append(*list, dev); - } - - return 0; -} - -GSList *qdev_build_hotpluggable_device_list(Object *peripheral) -{ - GSList *list = NULL; - - object_child_foreach(peripheral, qdev_add_hotpluggable_device, &list); - - return list; -} - static bool device_get_realized(Object *obj, Error **errp) { DeviceState *dev = DEVICE(obj); -- cgit 1.4.1