summary refs log tree commit diff stats
path: root/hw/block/nand.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/block/nand.c')
-rw-r--r--hw/block/nand.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/block/nand.c b/hw/block/nand.c
index 654e0cb5d1..5c8112ed5a 100644
--- a/hw/block/nand.c
+++ b/hw/block/nand.c
@@ -27,6 +27,7 @@
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
+#include "qom/object.h"
 
 # define NAND_CMD_READ0		0x00
 # define NAND_CMD_READ1		0x01
@@ -89,8 +90,8 @@ struct NANDFlashState {
 
 #define TYPE_NAND "nand"
 
-#define NAND(obj) \
-    OBJECT_CHECK(NANDFlashState, (obj), TYPE_NAND)
+DECLARE_INSTANCE_CHECKER(NANDFlashState, NAND,
+                         TYPE_NAND)
 
 static void mem_and(uint8_t *dest, const uint8_t *src, size_t n)
 {