Replace the hotplugged device_legacy_reset by device_cold_reset.
Since we're talking hotplug, cold reset seems the proper reset type.

This does change the behavior since the new function propagates
also the reset to eventual child buses. But it should be a bug if
resetting eventual child buses fail.

Signed-off-by: Damien Hedde <damien.he...@greensocs.com>
---
 hw/core/qdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 85c85822fd..1638bc9f3b 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -876,7 +876,7 @@ static void device_set_realized(Object *obj, bool value, 
Error **errp)
             }
         }
         if (dev->hotplugged) {
-            device_legacy_reset(dev);
+            device_cold_reset(dev);
         }
         dev->pending_deleted_event = false;
 
-- 
2.22.0


Reply via email to