qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [qemu-devel][PATCH v1 1/2] ssi.c: Check if slave already at


From: saipavanboddu
Subject: [Qemu-devel] [qemu-devel][PATCH v1 1/2] ssi.c: Check if slave already attached to a parent bus
Date: Tue, 27 Mar 2018 12:51:12 +0530

From: Sai Pavan Boddu <address@hidden>

Skip auto-connect if already connected to a bus

Signed-off-by: Sai Pavan Boddu <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Reviewed-by: Edgar E. Iglesias <address@hidden>
---
 hw/ssi/ssi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ssi/ssi.c b/hw/ssi/ssi.c
index 7eaaf56..6953c92 100644
--- a/hw/ssi/ssi.c
+++ b/hw/ssi/ssi.c
@@ -152,7 +152,7 @@ static int ssi_auto_connect_slave(Object *child, void 
*opaque)
     SSISlave *dev = (SSISlave *)object_dynamic_cast(child, TYPE_SSI_SLAVE);
     qemu_irq cs_line;
 
-    if (!dev) {
+    if (!dev || qdev_get_parent_bus(DEVICE(dev))) {
         return 0;
     }
 
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]