--- hw/isa-bus.c | 8 ++++---- hw/isa.h | 6 +++--- hw/mc146818rtc.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/isa-bus.c b/hw/isa-bus.c index 0beb1bf..50131f7 100644 --- a/hw/isa-bus.c +++ b/hw/isa-bus.c @@ -113,7 +113,7 @@ void isa_register_portio_list(ISADevice *dev, uint16_t start, static int isa_qdev_init(DeviceState *qdev, DeviceInfo *base) { - ISADevice *dev = DO_UPCAST(ISADevice, qdev, qdev); + ISADevice *dev = ISA_DEVICE(qdev); ISADeviceInfo *info = DO_UPCAST(ISADeviceInfo, qdev, base); dev->isairq[0] = -1; @@ -138,7 +138,7 @@ ISADevice *isa_create(const char *name) name); } dev = qdev_create(&isabus->qbus, name); - return DO_UPCAST(ISADevice, qdev, dev); + return ISA_DEVICE(dev); } ISADevice *isa_try_create(const char *name) @@ -150,7 +150,7 @@ ISADevice *isa_try_create(const char *name) name); } dev = qdev_try_create(&isabus->qbus, name); - return DO_UPCAST(ISADevice, qdev, dev); + return ISA_DEVICE(dev); } ISADevice *isa_create_simple(const char *name) @@ -164,7 +164,7 @@ ISADevice *isa_create_simple(const char *name) static void isabus_dev_print(Monitor *mon, DeviceState *dev, int indent) { - ISADevice *d = DO_UPCAST(ISADevice, qdev, dev); + ISADevice *d = ISA_DEVICE(dev); if (d->isairq[1] != -1) { monitor_printf(mon, "%*sisa irqs %d,%d\n", indent, "", diff --git a/hw/isa.h b/hw/isa.h index af7e3dc..d5fd7d7 100644 --- a/hw/isa.h +++ b/hw/isa.h @@ -15,11 +15,11 @@ typedef struct ISADeviceInfo ISADeviceInfo; #define TYPE_ISA_DEVICE "isa-device" #define ISA_DEVICE(obj) \ - OBJECT_CHECK(ISADeviceState, (obj), ISA_TYPE_DEVICE) + OBJECT_CHECK(ISADevice, (obj), TYPE_ISA_DEVICE) #define ISA_DEVICE_CLASS(klass) \ - OBJECT_CLASS_CHECK(ISADeviceClass, (klass), ISA_TYPE_DEVICE) + OBJECT_CLASS_CHECK(ISADeviceClass, (klass), TYPE_ISA_DEVICE) #define ISA_DEVICE_GET_CLASS(obj) \ - OBJECT_GET_CLASS(ISADeviceClass, (obj), ISA_TYPE_DEVICE) + OBJECT_GET_CLASS(ISADeviceClass, (obj), TYPE_ISA_DEVICE) typedef struct ISADeviceClass { DeviceClass parent_class; diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c index 0c23cb0..d5b737a 100644 --- a/hw/mc146818rtc.c +++ b/hw/mc146818rtc.c @@ -624,7 +624,7 @@ static void visit_type_int32(Visitor *v, int *value, const char *name, Error **e static void rtc_get_date(DeviceState *dev, Visitor *v, void *opaque, const char *name, Error **errp) { - ISADevice *isa = DO_UPCAST(ISADevice, qdev, dev); + ISADevice *isa = ISA_DEVICE(dev); RTCState *s = DO_UPCAST(RTCState, dev, isa); visit_start_struct(v, NULL, "struct tm", name, 0, errp); -- 1.7.4.1