Skip to contentSkip to conversation

include/hw/char: QOMify shakti_uart

PATCH New Vijai Kumar K 1 participant 1 message Jun 17, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 include/hw/char: QOMify shakti_uart

---
 include/hw/char/shakti_uart.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
include/hw/char/shakti_uart.h +4 -4
index 526c408233..2c305562e7 100644
@@ -27,6 +27,7 @@
 
 #include "hw/sysbus.h"
 #include "chardev/char-fe.h"
+#include "qom/object.h"
 
 #define SHAKTI_UART_BAUD        0x00
 #define SHAKTI_UART_TX          0x04
@@ -48,10 +49,9 @@
 #define SHAKTI_UART_CONTROL_DEFAULT 0x0100
 
 #define TYPE_SHAKTI_UART "shakti-uart"
-#define SHAKTI_UART(obj) \
-    OBJECT_CHECK(ShaktiUartState, (obj), TYPE_SHAKTI_UART)
+OBJECT_DECLARE_SIMPLE_TYPE(ShaktiUartState, SHAKTI_UART)
 
-typedef struct {
+struct ShaktiUartState {
     /* <private> */
     SysBusDevice parent_obj;
 
@@ -69,6 +69,6 @@ typedef struct {
     uint32_t uart_rx_threshold;
 
     CharBackend chr;
-} ShaktiUartState;
+};
 
 #endif /* HW_SHAKTI_UART_H */
Signature · 1 line
2.25.1