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?

thanks
-- PMM

Reply via email to