aboutsummaryrefslogtreecommitdiff
path: root/include/hw/block
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/block')
-rw-r--r--include/hw/block/flash.h8
-rw-r--r--include/hw/block/swim.h9
2 files changed, 10 insertions, 7 deletions
diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h
index 9b2fa7e92c..3e26303705 100644
--- a/include/hw/block/flash.h
+++ b/include/hw/block/flash.h
@@ -10,8 +10,8 @@
#define TYPE_PFLASH_CFI01 "cfi.pflash01"
typedef struct PFlashCFI01 PFlashCFI01;
-#define PFLASH_CFI01(obj) \
- OBJECT_CHECK(PFlashCFI01, (obj), TYPE_PFLASH_CFI01)
+DECLARE_INSTANCE_CHECKER(PFlashCFI01, PFLASH_CFI01,
+ TYPE_PFLASH_CFI01)
PFlashCFI01 *pflash_cfi01_register(hwaddr base,
@@ -31,8 +31,8 @@ void pflash_cfi01_legacy_drive(PFlashCFI01 *dev, DriveInfo *dinfo);
#define TYPE_PFLASH_CFI02 "cfi.pflash02"
typedef struct PFlashCFI02 PFlashCFI02;
-#define PFLASH_CFI02(obj) \
- OBJECT_CHECK(PFlashCFI02, (obj), TYPE_PFLASH_CFI02)
+DECLARE_INSTANCE_CHECKER(PFlashCFI02, PFLASH_CFI02,
+ TYPE_PFLASH_CFI02)
PFlashCFI02 *pflash_cfi02_register(hwaddr base,
diff --git a/include/hw/block/swim.h b/include/hw/block/swim.h
index f013d634f7..8287da7c30 100644
--- a/include/hw/block/swim.h
+++ b/include/hw/block/swim.h
@@ -22,7 +22,8 @@ typedef struct SWIMBus SWIMBus;
typedef struct SWIMCtrl SWIMCtrl;
#define TYPE_SWIM_DRIVE "swim-drive"
-#define SWIM_DRIVE(obj) OBJECT_CHECK(SWIMDrive, (obj), TYPE_SWIM_DRIVE)
+DECLARE_INSTANCE_CHECKER(SWIMDrive, SWIM_DRIVE,
+ TYPE_SWIM_DRIVE)
struct SWIMDrive {
DeviceState qdev;
@@ -31,7 +32,8 @@ struct SWIMDrive {
};
#define TYPE_SWIM_BUS "swim-bus"
-#define SWIM_BUS(obj) OBJECT_CHECK(SWIMBus, (obj), TYPE_SWIM_BUS)
+DECLARE_INSTANCE_CHECKER(SWIMBus, SWIM_BUS,
+ TYPE_SWIM_BUS)
struct SWIMBus {
BusState bus;
@@ -69,7 +71,8 @@ struct SWIMCtrl {
#define TYPE_SWIM "swim"
typedef struct Swim Swim;
-#define SWIM(obj) OBJECT_CHECK(Swim, (obj), TYPE_SWIM)
+DECLARE_INSTANCE_CHECKER(Swim, SWIM,
+ TYPE_SWIM)
struct Swim {
SysBusDevice parent_obj;