summaryrefslogtreecommitdiffstats
path: root/include/hw/isa
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/isa')
-rw-r--r--include/hw/isa/i8259_internal.h8
-rw-r--r--include/hw/isa/isa.h17
-rw-r--r--include/hw/isa/pc87312.h3
-rw-r--r--include/hw/isa/superio.h8
4 files changed, 12 insertions, 24 deletions
diff --git a/include/hw/isa/i8259_internal.h b/include/hw/isa/i8259_internal.h
index 69170df6f8..cd050bb9f2 100644
--- a/include/hw/isa/i8259_internal.h
+++ b/include/hw/isa/i8259_internal.h
@@ -34,12 +34,8 @@ typedef struct PICCommonState PICCommonState;
#define TYPE_PIC_COMMON "pic-common"
typedef struct PICCommonClass PICCommonClass;
-#define PIC_COMMON(obj) \
- OBJECT_CHECK(PICCommonState, (obj), TYPE_PIC_COMMON)
-#define PIC_COMMON_CLASS(klass) \
- OBJECT_CLASS_CHECK(PICCommonClass, (klass), TYPE_PIC_COMMON)
-#define PIC_COMMON_GET_CLASS(obj) \
- OBJECT_GET_CLASS(PICCommonClass, (obj), TYPE_PIC_COMMON)
+DECLARE_OBJ_CHECKERS(PICCommonState, PICCommonClass,
+ PIC_COMMON, TYPE_PIC_COMMON)
struct PICCommonClass {
ISADeviceClass parent_class;
diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h
index c7f27d5aa9..ddb6a2d168 100644
--- a/include/hw/isa/isa.h
+++ b/include/hw/isa/isa.h
@@ -12,15 +12,12 @@
#define TYPE_ISA_DEVICE "isa-device"
typedef struct ISADeviceClass ISADeviceClass;
-#define ISA_DEVICE(obj) \
- OBJECT_CHECK(ISADevice, (obj), TYPE_ISA_DEVICE)
-#define ISA_DEVICE_CLASS(klass) \
- OBJECT_CLASS_CHECK(ISADeviceClass, (klass), TYPE_ISA_DEVICE)
-#define ISA_DEVICE_GET_CLASS(obj) \
- OBJECT_GET_CLASS(ISADeviceClass, (obj), TYPE_ISA_DEVICE)
+DECLARE_OBJ_CHECKERS(ISADevice, ISADeviceClass,
+ ISA_DEVICE, TYPE_ISA_DEVICE)
#define TYPE_ISA_BUS "ISA"
-#define ISA_BUS(obj) OBJECT_CHECK(ISABus, (obj), TYPE_ISA_BUS)
+DECLARE_INSTANCE_CHECKER(ISABus, ISA_BUS,
+ TYPE_ISA_BUS)
#define TYPE_APPLE_SMC "isa-applesmc"
#define APPLESMC_MAX_DATA_LENGTH 32
@@ -39,10 +36,8 @@ static inline uint16_t applesmc_port(void)
#define TYPE_ISADMA "isa-dma"
typedef struct IsaDmaClass IsaDmaClass;
-#define ISADMA_CLASS(klass) \
- OBJECT_CLASS_CHECK(IsaDmaClass, (klass), TYPE_ISADMA)
-#define ISADMA_GET_CLASS(obj) \
- OBJECT_GET_CLASS(IsaDmaClass, (obj), TYPE_ISADMA)
+DECLARE_CLASS_CHECKERS(IsaDmaClass, ISADMA,
+ TYPE_ISADMA)
#define ISADMA(obj) \
INTERFACE_CHECK(IsaDma, (obj), TYPE_ISADMA)
diff --git a/include/hw/isa/pc87312.h b/include/hw/isa/pc87312.h
index c8e98ea029..a65168a157 100644
--- a/include/hw/isa/pc87312.h
+++ b/include/hw/isa/pc87312.h
@@ -31,7 +31,8 @@
#define TYPE_PC87312_SUPERIO "pc87312"
typedef struct PC87312State PC87312State;
-#define PC87312(obj) OBJECT_CHECK(PC87312State, (obj), TYPE_PC87312_SUPERIO)
+DECLARE_INSTANCE_CHECKER(PC87312State, PC87312,
+ TYPE_PC87312_SUPERIO)
struct PC87312State {
/*< private >*/
diff --git a/include/hw/isa/superio.h b/include/hw/isa/superio.h
index c782c8b64e..b9f5c19155 100644
--- a/include/hw/isa/superio.h
+++ b/include/hw/isa/superio.h
@@ -17,12 +17,8 @@
#define TYPE_ISA_SUPERIO "isa-superio"
typedef struct ISASuperIOClass ISASuperIOClass;
typedef struct ISASuperIODevice ISASuperIODevice;
-#define ISA_SUPERIO(obj) \
- OBJECT_CHECK(ISASuperIODevice, (obj), TYPE_ISA_SUPERIO)
-#define ISA_SUPERIO_GET_CLASS(obj) \
- OBJECT_GET_CLASS(ISASuperIOClass, (obj), TYPE_ISA_SUPERIO)
-#define ISA_SUPERIO_CLASS(klass) \
- OBJECT_CLASS_CHECK(ISASuperIOClass, (klass), TYPE_ISA_SUPERIO)
+DECLARE_OBJ_CHECKERS(ISASuperIODevice, ISASuperIOClass,
+ ISA_SUPERIO, TYPE_ISA_SUPERIO)
#define SUPERIO_MAX_SERIAL_PORTS 4