mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
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>
This commit is contained in:
parent
6c9dcd8760
commit
40f8214fcd
4 changed files with 11 additions and 13 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue