diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2023-06-21 09:53:51 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2023-06-22 09:30:11 +0200 |
commit | 7a1f3acb3f41a6bc896c1d7d1749336c21eb8cee (patch) | |
tree | 94e3bf8b6d1e4b39a8acb8bfb4074522fc5c7c7c /hw/m68k/q800.c | |
parent | 464085e8f6776a0ca5a2677cf8b93b25c8a94da4 (diff) | |
download | qemu-7a1f3acb3f41a6bc896c1d7d1749336c21eb8cee.zip qemu-7a1f3acb3f41a6bc896c1d7d1749336c21eb8cee.tar.gz qemu-7a1f3acb3f41a6bc896c1d7d1749336c21eb8cee.tar.bz2 |
q800: move macfb device to Q800MachineState
Also change the instantiation of the macfb device to use object_initialize_child().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20230621085353.113233-23-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/m68k/q800.c')
-rw-r--r-- | hw/m68k/q800.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index a32e6fb..b770b71 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -452,7 +452,9 @@ static void q800_machine_init(MachineState *machine) /* framebuffer in nubus slot #9 */ - dev = qdev_new(TYPE_NUBUS_MACFB); + object_initialize_child(OBJECT(machine), "macfb", &m->macfb, + TYPE_NUBUS_MACFB); + dev = DEVICE(&m->macfb); qdev_prop_set_uint32(dev, "slot", 9); qdev_prop_set_uint32(dev, "width", graphic_width); qdev_prop_set_uint32(dev, "height", graphic_height); @@ -462,7 +464,7 @@ static void q800_machine_init(MachineState *machine) } else { qdev_prop_set_uint8(dev, "display", MACFB_DISPLAY_VGA); } - qdev_realize_and_unref(dev, BUS(nubus), &error_fatal); + qdev_realize(dev, BUS(nubus), &error_fatal); macfb_mode = (NUBUS_MACFB(dev)->macfb).mode; |