[Skiboot] [PATCH] qemu: bt device isn't always hanging off /

Stewart Smith stewart at linux.ibm.com
Tue Dec 18 11:57:10 AEDT 2018


Just use the normal for_each_compatible instead.

Otherwise in the qemu model as executed by op-test,
we wouldn't go down the astbmc_init() path, thus not having flash.

Cc: stable # v6.2+
Fixes: 2f0b6af6e01c5f7b3c762647d06c4f792e2cb3b7
Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 platforms/qemu/qemu.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/platforms/qemu/qemu.c b/platforms/qemu/qemu.c
index 7ba7f26e155c..04bf3fb3f0ea 100644
--- a/platforms/qemu/qemu.c
+++ b/platforms/qemu/qemu.c
@@ -33,9 +33,8 @@ static bool qemu_probe(void)
         astbmc_early_init();
 
 	/* check if the BT device was defined by QEMU */
-	dt_for_each_child(dt_root, n) {
-		if (dt_node_is_compatible(n, "bt"))
-		       bt_device_present = true;
+	dt_for_each_compatible(dt_root, n, "bt") {
+		bt_device_present = true;
 	}
 
 	return true;
-- 
2.20.0



More information about the Skiboot mailing list