From d50280af1bc4b9a59c4a6424c6172a1397f5f6c3 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Tue, 21 Jan 2025 08:34:55 +0100 Subject: hw/ipack: Remove legacy qemu_allocate_irqs() use MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No need to dynamically allocate IRQ when we know before hands how many we'll use. Declare the 2 of them in IPackDevice state and initialize them in the DeviceRealize handler. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250121155526.29982-4-philmd@linaro.org> --- include/hw/ipack/ipack.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'include/hw/ipack/ipack.h') diff --git a/include/hw/ipack/ipack.h b/include/hw/ipack/ipack.h index cbcdda509d..00f397fd02 100644 --- a/include/hw/ipack/ipack.h +++ b/include/hw/ipack/ipack.h @@ -12,6 +12,7 @@ #define QEMU_IPACK_H #include "hw/qdev-core.h" +#include "hw/irq.h" #include "qom/object.h" @@ -19,10 +20,8 @@ OBJECT_DECLARE_SIMPLE_TYPE(IPackBus, IPACK_BUS) struct IPackBus { - /*< private >*/ BusState parent_obj; - /* All fields are private */ uint8_t n_slots; uint8_t free_slot; qemu_irq_handler set_irq; @@ -58,13 +57,11 @@ struct IPackDeviceClass { }; struct IPackDevice { - /*< private >*/ DeviceState parent_obj; - /*< public >*/ int32_t slot; /* IRQ objects for the IndustryPack INT0# and INT1# */ - qemu_irq *irq; + IRQState irq[2]; }; extern const VMStateDescription vmstate_ipack_device; -- cgit 1.4.1