aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/ccw-device.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/s390x/ccw-device.h')
-rw-r--r--hw/s390x/ccw-device.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/hw/s390x/ccw-device.h b/hw/s390x/ccw-device.h
index 4e6af287e7..cf7d492084 100644
--- a/hw/s390x/ccw-device.h
+++ b/hw/s390x/ccw-device.h
@@ -15,7 +15,7 @@
#include "hw/qdev-core.h"
#include "hw/s390x/css.h"
-typedef struct CcwDevice {
+struct CcwDevice {
DeviceState parent_obj;
SubchDev *sch;
/* <cssid>.<ssid>.<device number> */
@@ -25,18 +25,20 @@ typedef struct CcwDevice {
CssDevId dev_id;
/* The actual busid of the virtual subchannel. */
CssDevId subch_id;
-} CcwDevice;
+};
+typedef struct CcwDevice CcwDevice;
extern const VMStateDescription vmstate_ccw_dev;
#define VMSTATE_CCW_DEVICE(_field, _state) \
VMSTATE_STRUCT(_field, _state, 1, vmstate_ccw_dev, CcwDevice)
-typedef struct CCWDeviceClass {
+struct CCWDeviceClass {
DeviceClass parent_class;
void (*unplug)(HotplugHandler *, DeviceState *, Error **);
void (*realize)(CcwDevice *, Error **);
void (*refill_ids)(CcwDevice *);
-} CCWDeviceClass;
+};
+typedef struct CCWDeviceClass CCWDeviceClass;
static inline CcwDevice *to_ccw_dev_fast(DeviceState *d)
{
@@ -45,10 +47,7 @@ static inline CcwDevice *to_ccw_dev_fast(DeviceState *d)
#define TYPE_CCW_DEVICE "ccw-device"
-#define CCW_DEVICE(obj) OBJECT_CHECK(CcwDevice, (obj), TYPE_CCW_DEVICE)
-#define CCW_DEVICE_GET_CLASS(obj) \
- OBJECT_GET_CLASS(CCWDeviceClass, (obj), TYPE_CCW_DEVICE)
-#define CCW_DEVICE_CLASS(klass) \
- OBJECT_CLASS_CHECK(CCWDeviceClass, (klass), TYPE_CCW_DEVICE)
+DECLARE_OBJ_CHECKERS(CcwDevice, CCWDeviceClass,
+ CCW_DEVICE, TYPE_CCW_DEVICE)
#endif