Make the type checking macro name consistent with the TYPE_* constant. Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- Cc: Jason Wang <jasow...@redhat.com> Cc: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk> Cc: Artyom Tarasenko <atar4q...@gmail.com> Cc: qemu-devel@nongnu.org --- include/hw/net/lance.h | 2 +- hw/net/lance.c | 6 +++--- hw/sparc/sun4m.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/hw/net/lance.h b/include/hw/net/lance.h index f645d6af67..a0434f1254 100644 --- a/include/hw/net/lance.h +++ b/include/hw/net/lance.h @@ -36,7 +36,7 @@ #define TYPE_LANCE "lance" typedef struct SysBusPCNetState SysBusPCNetState; -DECLARE_INSTANCE_CHECKER(SysBusPCNetState, SYSBUS_PCNET, +DECLARE_INSTANCE_CHECKER(SysBusPCNetState, LANCE, TYPE_LANCE) struct SysBusPCNetState { diff --git a/hw/net/lance.c b/hw/net/lance.c index 4c5f01baad..47ab7e1847 100644 --- a/hw/net/lance.c +++ b/hw/net/lance.c @@ -103,7 +103,7 @@ static const VMStateDescription vmstate_lance = { static void lance_realize(DeviceState *dev, Error **errp) { SysBusDevice *sbd = SYS_BUS_DEVICE(dev); - SysBusPCNetState *d = SYSBUS_PCNET(dev); + SysBusPCNetState *d = LANCE(dev); PCNetState *s = &d->state; memory_region_init_io(&s->mmio, OBJECT(d), &lance_mem_ops, d, @@ -122,14 +122,14 @@ static void lance_realize(DeviceState *dev, Error **errp) static void lance_reset(DeviceState *dev) { - SysBusPCNetState *d = SYSBUS_PCNET(dev); + SysBusPCNetState *d = LANCE(dev); pcnet_h_reset(&d->state); } static void lance_instance_init(Object *obj) { - SysBusPCNetState *d = SYSBUS_PCNET(obj); + SysBusPCNetState *d = LANCE(obj); PCNetState *s = &d->state; device_add_bootindex_property(obj, &s->conf.bootindex, diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 3ee7ef4590..192cb87658 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -353,7 +353,7 @@ static void *sparc32_dma_init(hwaddr dma_base, OBJECT(dma), "ledma")); sysbus_connect_irq(SYS_BUS_DEVICE(ledma), 0, ledma_irq); - lance = SYSBUS_PCNET(object_resolve_path_component( + lance = LANCE(object_resolve_path_component( OBJECT(ledma), "lance")); sysbus_mmio_map(SYS_BUS_DEVICE(lance), 0, le_base); -- 2.26.2