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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/char/grlib_apbuart.c b/hw/char/grlib_apbuart.c
index 16d0feac59..6fd88d83ad 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
-#define GRLIB_APB_UART(obj) \
- OBJECT_CHECK(UART, (obj), TYPE_GRLIB_APB_UART)
+typedef struct UART UART;
+DECLARE_INSTANCE_CHECKER(UART, GRLIB_APB_UART,
+ 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)
{