[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/3] hw/input/lasips2: Move LASIPS2State declaration to 'hw/input
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 2/3] hw/input/lasips2: Move LASIPS2State declaration to 'hw/input/lasips2.h' |
Date: |
Mon, 20 Sep 2021 08:40:47 +0200 |
We want to use the OBJECT_DECLARE_SIMPLE_TYPE() macro to QOM'ify
this device in the next commit. To make its review simpler, as a
first step move the LASIPS2State and LASIPS2Port declarations to
'hw/input/lasips2.h'
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/input/lasips2.h | 18 ++++++++++++++++++
hw/input/lasips2.c | 18 ------------------
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/include/hw/input/lasips2.h b/include/hw/input/lasips2.h
index 0cd7b59064a..c88f1700162 100644
--- a/include/hw/input/lasips2.h
+++ b/include/hw/input/lasips2.h
@@ -11,6 +11,24 @@
#define TYPE_LASIPS2 "lasips2"
+struct LASIPS2State;
+typedef struct LASIPS2Port {
+ struct LASIPS2State *parent;
+ MemoryRegion reg;
+ void *dev;
+ uint8_t id;
+ uint8_t control;
+ uint8_t buf;
+ bool loopback_rbne;
+ bool irq;
+} LASIPS2Port;
+
+typedef struct LASIPS2State {
+ LASIPS2Port kbd;
+ LASIPS2Port mouse;
+ qemu_irq irq;
+} LASIPS2State;
+
void lasips2_init(MemoryRegion *address_space, hwaddr base, qemu_irq irq);
#endif /* HW_INPUT_LASIPS2_H */
diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c
index 68d741d3421..0f8362f17bc 100644
--- a/hw/input/lasips2.c
+++ b/hw/input/lasips2.c
@@ -33,24 +33,6 @@
#include "hw/irq.h"
-struct LASIPS2State;
-typedef struct LASIPS2Port {
- struct LASIPS2State *parent;
- MemoryRegion reg;
- void *dev;
- uint8_t id;
- uint8_t control;
- uint8_t buf;
- bool loopback_rbne;
- bool irq;
-} LASIPS2Port;
-
-typedef struct LASIPS2State {
- LASIPS2Port kbd;
- LASIPS2Port mouse;
- qemu_irq irq;
-} LASIPS2State;
-
static const VMStateDescription vmstate_lasips2 = {
.name = "lasips2",
.version_id = 0,
--
2.31.1