]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/spi/armada100_spi.c
Merge branch 'master' of git://git.denx.de/u-boot-arm
[karo-tx-uboot.git] / drivers / spi / armada100_spi.c
index 7384c9cd2c14671231e80f41ba889ec3b3736cdd..afdbe0508ca1c0db7cc88237e45288c626f8e304 100644 (file)
@@ -120,12 +120,10 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
 {
        struct armd_spi_slave *pss;
 
-       pss = malloc(sizeof(*pss));
+       pss = spi_alloc_slave(struct armd_spi_slave, bus, cs);
        if (!pss)
                return NULL;
 
-       pss->slave.bus = bus;
-       pss->slave.cs = cs;
        pss->spi_reg = (struct ssp_reg *)SSP_REG_BASE(CONFIG_SYS_SSP_PORT);
 
        pss->cr0 = SSCR0_MOTO | SSCR0_DATASIZE(DEFAULT_WORD_LEN) | SSCR0_SSE;