]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/dma/rc4030.c
Use OBJECT_DECLARE_SIMPLE_TYPE when possible
[mirror_qemu.git] / hw / dma / rc4030.c
index 7eddc9a776757bbde04e33c57501a34eca07364f..e4d2f1725bcc7fd7c0266d62ca9008c44ec9a5b3 100644 (file)
@@ -34,6 +34,7 @@
 #include "qemu/module.h"
 #include "exec/address-spaces.h"
 #include "trace.h"
+#include "qom/object.h"
 
 /********************************************************/
 /* rc4030 emulation                                     */
@@ -55,12 +56,11 @@ typedef struct dma_pagetable_entry {
 #define DMA_FLAG_ADDR_INTR  0x0400
 
 #define TYPE_RC4030 "rc4030"
-#define RC4030(obj) \
-    OBJECT_CHECK(rc4030State, (obj), TYPE_RC4030)
+OBJECT_DECLARE_SIMPLE_TYPE(rc4030State, RC4030)
 
 #define TYPE_RC4030_IOMMU_MEMORY_REGION "rc4030-iommu-memory-region"
 
-typedef struct rc4030State {
+struct rc4030State {
 
     SysBusDevice parent;
 
@@ -101,7 +101,7 @@ typedef struct rc4030State {
 
     MemoryRegion iomem_chipset;
     MemoryRegion iomem_jazzio;
-} rc4030State;
+};
 
 static void set_next_tick(rc4030State *s)
 {