On Tue, Dec 15, 2015 at 10:46 AM, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 23 November 2015 at 08:54, Alistair Francis > <alistair.fran...@xilinx.com> wrote: >> Connect the Xilinx SPI devices to the ZynqMP model. >> >> Signed-off-by: Alistair Francis <alistair.fran...@xilinx.com> > >> + /* Rename each SPI bus after the SPI device to allow the board >> + * to access all of the busses from the SoC. >> + */ >> + spi_bus = qdev_get_child_bus(DEVICE(&s->spi[i]), "spi0"); >> + snprintf(bus_name, 6, "spi%d", i); >> + memcpy((char *) spi_bus->name, bus_name, 6 * sizeof(char)); > > This looks very dubious. If we need to be able to rename buses > can we provide a proper API to do it please, rather than just > memcpying into the name field?
Ok, I have added a qdev function which renames busses. Re-sending now. Thanks, Alistair > > thanks > -- PMM >