On Sat, Feb 28, 2015 at 6:52 PM, Alistair Francis <alistair.fran...@xilinx.com> wrote: > On Sat, Feb 28, 2015 at 3:59 AM, Andreas Färber <afaer...@suse.de> wrote: >> Am 27.02.2015 um 02:48 schrieb Alistair Francis: >>> Use the DeviceClass realize() and init() instead of >>> the deprecated SysBusDevice init(). >>> >>> Signed-off-by: Alistair Francis <alistair.fran...@xilinx.com> >>> Reviewed-by: Peter Crosthwaite <peter.crosthwa...@xilinx.com> >> >> Thanks, applied to qom-next with some wording/syntax changes and the >> following QOM cast cleanup:
I haven't seen the pull request for this one yet. Is it going into 2.3? Thanks, Alistair >> >> diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c >> index a713a08..36084d5 100644 >> --- a/hw/char/cadence_uart.c >> +++ b/hw/char/cadence_uart.c >> @@ -494,10 +494,11 @@ static void cadence_uart_realize(DeviceState *dev, >> Error **errp) >> static void cadence_uart_init(Object *obj) >> { >> UartState *s = CADENCE_UART(obj); >> + SysBusDevice *sbd = SYS_BUS_DEVICE(obj); >> >> memory_region_init_io(&s->iomem, obj, &uart_ops, s, "uart", 0x1000); >> - sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->iomem); >> - sysbus_init_irq(SYS_BUS_DEVICE(obj), &s->irq); >> + sysbus_init_mmio(sbd, &s->iomem); >> + sysbus_init_irq(sbd, &s->irq); >> >> s->char_tx_time = (get_ticks_per_sec() / 9600) * 10; >> } >> >> fixing myself up with the canonical order: >> >> diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c >> index 36084d5..a5dc2a4 100644 >> --- a/hw/char/cadence_uart.c >> +++ b/hw/char/cadence_uart.c >> @@ -493,8 +493,8 @@ static void cadence_uart_realize(DeviceState *dev, >> Error **errp) >> >> static void cadence_uart_init(Object *obj) >> { >> - UartState *s = CADENCE_UART(obj); >> SysBusDevice *sbd = SYS_BUS_DEVICE(obj); >> + UartState *s = CADENCE_UART(obj); >> >> memory_region_init_io(&s->iomem, obj, &uart_ops, s, "uart", 0x1000); >> sysbus_init_mmio(sbd, &s->iomem); >> >> https://github.com/afaerber/qemu-cpu/commits/qom-next > > Looks good, thanks for taking it via qom-next. > > Thanks, > > Alistair > >> >> Regards, >> Andreas >> >> -- >> SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany >> GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, >> Graham Norton; HRB 21284 (AG Nürnberg) >>