[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 3/5] hw/i386/pc: Inline legacy pcspk_init() in pc_basic_device
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 3/5] hw/i386/pc: Inline legacy pcspk_init() in pc_basic_device_init() |
Date: |
Fri, 20 Oct 2023 12:54:44 +0200 |
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/i386/pc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index c58a15182e..3937d88355 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1286,7 +1286,11 @@ bool pc_basic_device_init(struct PCMachineState *pcms,
/* connect PIT to output control line of the HPET */
qdev_connect_gpio_out(hpet, 0, qdev_get_gpio_in(DEVICE(pit), 0));
}
- pcspk_init(pcms->pcspk, isa_bus, pit);
+ object_property_set_link(OBJECT(pcms->pcspk), "pit",
+ OBJECT(pit), &error_fatal);
+ if (!isa_realize_and_unref(pcms->pcspk, isa_bus, errp)) {
+ return false;
+ }
}
/* Super I/O */
--
2.41.0
- [PATCH v3 0/5] hw/audio/pcspk: Inline pcspk_init(), Philippe Mathieu-Daudé, 2023/10/20
- [PATCH v3 1/5] hw/i386/pc: Pass Error** argument to pc_basic_device_init(), Philippe Mathieu-Daudé, 2023/10/20
- [PATCH v3 2/5] hw/i386/pc: Propagate error if HPET device creation failed, Philippe Mathieu-Daudé, 2023/10/20
- [PATCH v3 3/5] hw/i386/pc: Inline legacy pcspk_init() in pc_basic_device_init(),
Philippe Mathieu-Daudé <=
- [PATCH v3 4/5] hw/isa/i82378: Inline legacy pcspk_init(), Philippe Mathieu-Daudé, 2023/10/20
- [PATCH v3 5/5] hw/mips/jazz: Inline and remove legacy pcspk_init(), Philippe Mathieu-Daudé, 2023/10/20
- Re: [PATCH v3 0/5] hw/audio/pcspk: Inline pcspk_init(), Richard Henderson, 2023/10/21