aboutsummaryrefslogtreecommitdiff
path: root/hw/char/grlib_apbuart.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/char/grlib_apbuart.c')
-rw-r--r--hw/char/grlib_apbuart.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/char/grlib_apbuart.c b/hw/char/grlib_apbuart.c
index 16d0feac59..f48ad21c7c 100644
--- a/hw/char/grlib_apbuart.c
+++ b/hw/char/grlib_apbuart.c
@@ -31,6 +31,7 @@
#include "chardev/char-fe.h"
#include "trace.h"
+#include "qom/object.h"
#define UART_REG_SIZE 20 /* Size of memory mapped registers */
@@ -72,10 +73,11 @@
#define FIFO_LENGTH 1024
+typedef struct UART UART;
#define GRLIB_APB_UART(obj) \
OBJECT_CHECK(UART, (obj), TYPE_GRLIB_APB_UART)
-typedef struct UART {
+struct UART {
SysBusDevice parent_obj;
MemoryRegion iomem;
@@ -91,7 +93,7 @@ typedef struct UART {
char buffer[FIFO_LENGTH];
int len;
int current;
-} UART;
+};
static int uart_data_to_read(UART *uart)
{