summary refs log tree commit diff stats
path: root/include/hw/ipack/ipack.h
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-21 08:34:55 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-31 19:36:44 +0100
commitd50280af1bc4b9a59c4a6424c6172a1397f5f6c3 (patch)
treee456a79462d5977e0f2f9a73a12fdcfa159a8eb4 /include/hw/ipack/ipack.h
parent29df910401a66ee65f553eecebf01993115082d2 (diff)
downloadfocaccia-qemu-d50280af1bc4b9a59c4a6424c6172a1397f5f6c3.tar.gz
focaccia-qemu-d50280af1bc4b9a59c4a6424c6172a1397f5f6c3.zip
hw/ipack: Remove legacy qemu_allocate_irqs() use
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é <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250121155526.29982-4-philmd@linaro.org>
Diffstat (limited to 'include/hw/ipack/ipack.h')
-rw-r--r--include/hw/ipack/ipack.h7
1 files changed, 2 insertions, 5 deletions
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;