aboutsummaryrefslogtreecommitdiff
path: root/include/hw/misc/macio
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/misc/macio')
-rw-r--r--include/hw/misc/macio/cuda.h7
-rw-r--r--include/hw/misc/macio/gpio.h3
-rw-r--r--include/hw/misc/macio/macio.h17
-rw-r--r--include/hw/misc/macio/pmu.h7
4 files changed, 20 insertions, 14 deletions
diff --git a/include/hw/misc/macio/cuda.h b/include/hw/misc/macio/cuda.h
index f2b0069262..e738b6376f 100644
--- a/include/hw/misc/macio/cuda.h
+++ b/include/hw/misc/macio/cuda.h
@@ -66,13 +66,14 @@ struct MOS6522CUDAState {
typedef struct MOS6522CUDAState MOS6522CUDAState;
#define TYPE_MOS6522_CUDA "mos6522-cuda"
-#define MOS6522_CUDA(obj) OBJECT_CHECK(MOS6522CUDAState, (obj), \
- TYPE_MOS6522_CUDA)
+DECLARE_INSTANCE_CHECKER(MOS6522CUDAState, MOS6522_CUDA,
+ TYPE_MOS6522_CUDA)
/* Cuda */
#define TYPE_CUDA "cuda"
typedef struct CUDAState CUDAState;
-#define CUDA(obj) OBJECT_CHECK(CUDAState, (obj), TYPE_CUDA)
+DECLARE_INSTANCE_CHECKER(CUDAState, CUDA,
+ TYPE_CUDA)
struct CUDAState {
/*< private >*/
diff --git a/include/hw/misc/macio/gpio.h b/include/hw/misc/macio/gpio.h
index 2234873250..1d0c8434ae 100644
--- a/include/hw/misc/macio/gpio.h
+++ b/include/hw/misc/macio/gpio.h
@@ -32,7 +32,8 @@
#define TYPE_MACIO_GPIO "macio-gpio"
typedef struct MacIOGPIOState MacIOGPIOState;
-#define MACIO_GPIO(obj) OBJECT_CHECK(MacIOGPIOState, (obj), TYPE_MACIO_GPIO)
+DECLARE_INSTANCE_CHECKER(MacIOGPIOState, MACIO_GPIO,
+ TYPE_MACIO_GPIO)
struct MacIOGPIOState {
/*< private >*/
diff --git a/include/hw/misc/macio/macio.h b/include/hw/misc/macio/macio.h
index 81c28eeef7..02dbf37630 100644
--- a/include/hw/misc/macio/macio.h
+++ b/include/hw/misc/macio/macio.h
@@ -41,7 +41,8 @@
/* MacIO virtual bus */
#define TYPE_MACIO_BUS "macio-bus"
typedef struct MacIOBusState MacIOBusState;
-#define MACIO_BUS(obj) OBJECT_CHECK(MacIOBusState, (obj), TYPE_MACIO_BUS)
+DECLARE_INSTANCE_CHECKER(MacIOBusState, MACIO_BUS,
+ TYPE_MACIO_BUS)
struct MacIOBusState {
/*< private >*/
@@ -51,7 +52,8 @@ struct MacIOBusState {
/* MacIO IDE */
#define TYPE_MACIO_IDE "macio-ide"
typedef struct MACIOIDEState MACIOIDEState;
-#define MACIO_IDE(obj) OBJECT_CHECK(MACIOIDEState, (obj), TYPE_MACIO_IDE)
+DECLARE_INSTANCE_CHECKER(MACIOIDEState, MACIO_IDE,
+ TYPE_MACIO_IDE)
struct MACIOIDEState {
/*< private >*/
@@ -78,7 +80,8 @@ void macio_ide_register_dma(MACIOIDEState *ide);
#define TYPE_MACIO "macio"
typedef struct MacIOState MacIOState;
-#define MACIO(obj) OBJECT_CHECK(MacIOState, (obj), TYPE_MACIO)
+DECLARE_INSTANCE_CHECKER(MacIOState, MACIO,
+ TYPE_MACIO)
struct MacIOState {
/*< private >*/
@@ -96,8 +99,8 @@ struct MacIOState {
#define TYPE_OLDWORLD_MACIO "macio-oldworld"
typedef struct OldWorldMacIOState OldWorldMacIOState;
-#define OLDWORLD_MACIO(obj) \
- OBJECT_CHECK(OldWorldMacIOState, (obj), TYPE_OLDWORLD_MACIO)
+DECLARE_INSTANCE_CHECKER(OldWorldMacIOState, OLDWORLD_MACIO,
+ TYPE_OLDWORLD_MACIO)
struct OldWorldMacIOState {
/*< private >*/
@@ -112,8 +115,8 @@ struct OldWorldMacIOState {
#define TYPE_NEWWORLD_MACIO "macio-newworld"
typedef struct NewWorldMacIOState NewWorldMacIOState;
-#define NEWWORLD_MACIO(obj) \
- OBJECT_CHECK(NewWorldMacIOState, (obj), TYPE_NEWWORLD_MACIO)
+DECLARE_INSTANCE_CHECKER(NewWorldMacIOState, NEWWORLD_MACIO,
+ TYPE_NEWWORLD_MACIO)
struct NewWorldMacIOState {
/*< private >*/
diff --git a/include/hw/misc/macio/pmu.h b/include/hw/misc/macio/pmu.h
index b3982f6f32..0d1a5c1406 100644
--- a/include/hw/misc/macio/pmu.h
+++ b/include/hw/misc/macio/pmu.h
@@ -181,8 +181,8 @@ struct MOS6522PMUState {
typedef struct MOS6522PMUState MOS6522PMUState;
#define TYPE_MOS6522_PMU "mos6522-pmu"
-#define MOS6522_PMU(obj) OBJECT_CHECK(MOS6522PMUState, (obj), \
- TYPE_MOS6522_PMU)
+DECLARE_INSTANCE_CHECKER(MOS6522PMUState, MOS6522_PMU,
+ TYPE_MOS6522_PMU)
/**
* PMUState:
* @last_b: last value of B register
@@ -234,6 +234,7 @@ struct PMUState {
typedef struct PMUState PMUState;
#define TYPE_VIA_PMU "via-pmu"
-#define VIA_PMU(obj) OBJECT_CHECK(PMUState, (obj), TYPE_VIA_PMU)
+DECLARE_INSTANCE_CHECKER(PMUState, VIA_PMU,
+ TYPE_VIA_PMU)
#endif /* PMU_H */