[RFC PATCH v2 128/137] hw/arm/digic: Parent the DIGIC SoC under the machine

Alexander Graf <[email protected]>
Newsgroups org.nongnu.qemu-arm,org.nongnu.qemu-devel,org.nongnu.qemu-riscv
Message-ID <[email protected]>
Bring digic in line with cubieboard/orangepi/bpim2u/imx6ul/imx7,
which all parent their SoC as /machine/soc.

AI-used-for: code (refactoring)
Signed-off-by: Alexander Graf <[email protected]>
---
 hw/arm/digic_boards.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
index 92b66f34f7..bdc5f7324b 100644
--- a/hw/arm/digic_boards.c
+++ b/hw/arm/digic_boards.c
@@ -50,7 +50,8 @@ typedef struct DigicBoard {
 static void digic4_board_init(MachineState *machine, DigicBoard *board)
 {
     Error *err = NULL;
-    DigicState *s = DIGIC(object_new(TYPE_DIGIC));
+    DigicState *s = DIGIC(object_new_child(OBJECT(machine), "soc",
+                                           TYPE_DIGIC));
     MachineClass *mc = MACHINE_GET_CLASS(machine);
 
     if (machine->ram_size != mc->default_ram_size) {
-- 
2.47.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.