diff options
Diffstat (limited to 'include/hw/block/swim.h')
-rw-r--r-- | include/hw/block/swim.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/hw/block/swim.h b/include/hw/block/swim.h index 9d8b65c561..8287da7c30 100644 --- a/include/hw/block/swim.h +++ b/include/hw/block/swim.h @@ -13,6 +13,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" +#include "qom/object.h" #define SWIM_MAX_FD 2 @@ -21,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; @@ -30,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; @@ -67,10 +70,12 @@ struct SWIMCtrl { }; #define TYPE_SWIM "swim" -#define SWIM(obj) OBJECT_CHECK(Swim, (obj), TYPE_SWIM) +typedef struct Swim Swim; +DECLARE_INSTANCE_CHECKER(Swim, SWIM, + TYPE_SWIM) -typedef struct Swim { +struct Swim { SysBusDevice parent_obj; SWIMCtrl ctrl; -} Swim; +}; #endif |