diff options
Diffstat (limited to 'hw/char/lm32_uart.c')
-rw-r--r-- | hw/char/lm32_uart.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/char/lm32_uart.c b/hw/char/lm32_uart.c index b0b1092889..624bc83c5f 100644 --- a/hw/char/lm32_uart.c +++ b/hw/char/lm32_uart.c @@ -31,6 +31,7 @@ #include "chardev/char-fe.h" #include "qemu/error-report.h" #include "qemu/module.h" +#include "qom/object.h" enum { R_RXTX = 0, @@ -94,7 +95,9 @@ enum { }; #define TYPE_LM32_UART "lm32-uart" -#define LM32_UART(obj) OBJECT_CHECK(LM32UartState, (obj), TYPE_LM32_UART) +typedef struct LM32UartState LM32UartState; +DECLARE_INSTANCE_CHECKER(LM32UartState, LM32_UART, + TYPE_LM32_UART) struct LM32UartState { SysBusDevice parent_obj; @@ -105,7 +108,6 @@ struct LM32UartState { uint32_t regs[R_MAX]; }; -typedef struct LM32UartState LM32UartState; static void uart_update_irq(LM32UartState *s) { |