aboutsummaryrefslogtreecommitdiff
path: root/include/hw/misc/zynq-xadc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/misc/zynq-xadc.h')
-rw-r--r--include/hw/misc/zynq-xadc.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/hw/misc/zynq-xadc.h b/include/hw/misc/zynq-xadc.h
index f1a410a376..052f47954f 100644
--- a/include/hw/misc/zynq-xadc.h
+++ b/include/hw/misc/zynq-xadc.h
@@ -16,6 +16,7 @@
#define ZYNQ_XADC_H
#include "hw/sysbus.h"
+#include "qom/object.h"
#define ZYNQ_XADC_MMIO_SIZE 0x0020
#define ZYNQ_XADC_NUM_IO_REGS (ZYNQ_XADC_MMIO_SIZE / 4)
@@ -23,10 +24,11 @@
#define ZYNQ_XADC_FIFO_DEPTH 15
#define TYPE_ZYNQ_XADC "xlnx,zynq-xadc"
-#define ZYNQ_XADC(obj) \
- OBJECT_CHECK(ZynqXADCState, (obj), TYPE_ZYNQ_XADC)
+typedef struct ZynqXADCState ZynqXADCState;
+DECLARE_INSTANCE_CHECKER(ZynqXADCState, ZYNQ_XADC,
+ TYPE_ZYNQ_XADC)
-typedef struct ZynqXADCState {
+struct ZynqXADCState {
/*< private >*/
SysBusDevice parent_obj;
@@ -41,6 +43,6 @@ typedef struct ZynqXADCState {
struct IRQState *qemu_irq;
-} ZynqXADCState;
+};
#endif /* ZYNQ_XADC_H */