diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-10-16 12:12:39 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-10-19 23:13:28 +0200 |
commit | 40f8214fcde40bab3ef6d1ab0b2353c7f8bc62aa (patch) | |
tree | 0a779fa08eccd417ca56f11b99741c4985179844 /hw/mips | |
parent | 6c9dcd8760092e455f86f6afb05d87ea827da8f3 (diff) | |
download | qemu-40f8214fcde40bab3ef6d1ab0b2353c7f8bc62aa.zip qemu-40f8214fcde40bab3ef6d1ab0b2353c7f8bc62aa.tar.gz qemu-40f8214fcde40bab3ef6d1ab0b2353c7f8bc62aa.tar.bz2 |
hw/audio/pcspk: Inline pcspk_init()
pcspk_init() is a legacy init function, inline and remove it.
Since the device is realized using &error_fatal, use the same
error for setting the "pit" link.
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20231019073307.99608-1-philmd@linaro.org>
Diffstat (limited to 'hw/mips')
-rw-r--r-- | hw/mips/jazz.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index 86dfe05..d33a76a 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c @@ -176,6 +176,7 @@ static void mips_jazz_init(MachineState *machine, SysBusDevice *sysbus; ISABus *isa_bus; ISADevice *pit; + ISADevice *pcspk; DriveInfo *fds[MAX_FD]; MemoryRegion *bios = g_new(MemoryRegion, 1); MemoryRegion *bios2 = g_new(MemoryRegion, 1); @@ -278,7 +279,9 @@ static void mips_jazz_init(MachineState *machine, isa_bus_register_input_irqs(isa_bus, i8259); i8257_dma_init(isa_bus, 0); pit = i8254_pit_init(isa_bus, 0x40, 0, NULL); - pcspk_init(isa_new(TYPE_PC_SPEAKER), isa_bus, pit); + pcspk = isa_new(TYPE_PC_SPEAKER); + object_property_set_link(OBJECT(pcspk), "pit", OBJECT(pit), &error_fatal); + isa_realize_and_unref(pcspk, isa_bus, &error_fatal); /* Video card */ switch (jazz_model) { |