[PATCH v3 20/23] q800: don't access Nubus bus directly from the mac-nubus-bridge device

Mark Cave-Ayland posted 23 patches 2 years, 8 months ago
Maintainers: Laurent Vivier <laurent@vivier.eu>, Jason Wang <jasowang@redhat.com>
There is a newer version of this series
[PATCH v3 20/23] q800: don't access Nubus bus directly from the mac-nubus-bridge device
Posted by Mark Cave-Ayland 2 years, 8 months ago
Instead use the qdev_get_child_bus() function which is intended for this exact
purpose.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/m68k/q800.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
index 14879310ca..df2765dbd1 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -448,7 +448,7 @@ static void q800_machine_init(MachineState *machine)
                           qdev_get_gpio_in_named(DEVICE(&m->via2), "nubus-irq",
                                                  VIA2_NUBUS_IRQ_9));
 
-    nubus = &NUBUS_BRIDGE(dev)->bus;
+    nubus = NUBUS_BUS(qdev_get_child_bus(dev, "nubus-bus.0"));
 
     /* framebuffer in nubus slot #9 */
 
-- 
2.30.2
Re: [PATCH v3 20/23] q800: don't access Nubus bus directly from the mac-nubus-bridge device
Posted by Philippe Mathieu-Daudé 2 years, 8 months ago
On 4/6/23 15:14, Mark Cave-Ayland wrote:
> Instead use the qdev_get_child_bus() function which is intended for this exact
> purpose.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Reviewed-by: Laurent Vivier <laurent@vivier.eu>
> ---
>   hw/m68k/q800.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>