From f8d89a7da4126f1756b1bba56c616afac96dfdce Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Tue, 12 Jul 2022 22:52:27 +0100 Subject: lasips2: QOMify LASIPS2Port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This becomes an abstract QOM type which will be a parent type for separate keyboard and mouse port types. Signed-off-by: Mark Cave-Ayland Tested-by: Helge Deller Acked-by: Helge Deller Reviewed-by: Peter Maydell Message-Id: <20220712215251.7944-17-mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé --- include/hw/input/lasips2.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'include/hw') diff --git a/include/hw/input/lasips2.h b/include/hw/input/lasips2.h index 9746b7a..f451408 100644 --- a/include/hw/input/lasips2.h +++ b/include/hw/input/lasips2.h @@ -25,9 +25,15 @@ #include "hw/sysbus.h" #include "hw/input/ps2.h" -struct LASIPS2State; -typedef struct LASIPS2Port { - struct LASIPS2State *parent; +#define TYPE_LASIPS2_PORT "lasips2-port" +OBJECT_DECLARE_SIMPLE_TYPE(LASIPS2Port, LASIPS2_PORT) + +typedef struct LASIPS2State LASIPS2State; + +struct LASIPS2Port { + DeviceState parent_obj; + + LASIPS2State *parent; MemoryRegion reg; PS2State *ps2dev; uint8_t id; @@ -35,7 +41,7 @@ typedef struct LASIPS2Port { uint8_t buf; bool loopback_rbne; bool irq; -} LASIPS2Port; +}; struct LASIPS2State { SysBusDevice parent_obj; -- cgit v1.1