X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fspi%2Fmpc52xx_spi.c;h=4b50bca880a8bdc9420d4163b0913bfe9f1a019d;hb=dcfe863838becd4cf4dba4d89aef2332150fe90f;hp=3e96b3f9f3b88fa997667a931650d76d8bdf9667;hpb=bec9cab9291bb221714d559a44fe37669a8ca604;p=u-boot diff --git a/drivers/spi/mpc52xx_spi.c b/drivers/spi/mpc52xx_spi.c index 3e96b3f9f3..4b50bca880 100644 --- a/drivers/spi/mpc52xx_spi.c +++ b/drivers/spi/mpc52xx_spi.c @@ -48,13 +48,10 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, { struct spi_slave *slave; - slave = malloc(sizeof(struct spi_slave)); + slave = spi_alloc_slave_base(bus, cs); if (!slave) return NULL; - slave->bus = bus; - slave->cs = cs; - return slave; }