diff options
Diffstat (limited to 'hw/misc/pc-testdev.c')
-rw-r--r-- | hw/misc/pc-testdev.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/misc/pc-testdev.c b/hw/misc/pc-testdev.c index 8aa8e65..577a15b 100644 --- a/hw/misc/pc-testdev.c +++ b/hw/misc/pc-testdev.c @@ -39,10 +39,11 @@ #include "qemu/module.h" #include "hw/irq.h" #include "hw/isa/isa.h" +#include "qom/object.h" #define IOMEM_LEN 0x10000 -typedef struct PCTestdev { +struct PCTestdev { ISADevice parent_obj; MemoryRegion ioport; @@ -52,11 +53,12 @@ typedef struct PCTestdev { MemoryRegion iomem; uint32_t ioport_data; char iomem_buf[IOMEM_LEN]; -} PCTestdev; +}; +typedef struct PCTestdev PCTestdev; #define TYPE_TESTDEV "pc-testdev" -#define TESTDEV(obj) \ - OBJECT_CHECK(PCTestdev, (obj), TYPE_TESTDEV) +DECLARE_INSTANCE_CHECKER(PCTestdev, TESTDEV, + TYPE_TESTDEV) static uint64_t test_irq_line_read(void *opaque, hwaddr addr, unsigned size) { |