]> git.sur5r.net Git - u-boot/blobdiff - drivers/spi/mpc8xxx_spi.c
Merge branch 'master' of git://git.denx.de/u-boot-74xx-7xx
[u-boot] / drivers / spi / mpc8xxx_spi.c
index 4e46041dfff5df76c98561d161daa4a13790acd5..6b0e3b46ec8fead7db89daf64e67422dc9fe50bd 100644 (file)
@@ -45,13 +45,10 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
        if (!spi_cs_is_valid(bus, cs))
                return NULL;
 
-       slave = malloc(sizeof(struct spi_slave));
+       slave = spi_alloc_slave_base(bus, cs);
        if (!slave)
                return NULL;
 
-       slave->bus = bus;
-       slave->cs = cs;
-
        /*
         * TODO: Some of the code in spi_init() should probably move
         * here, or into spi_claim_bus() below.