diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-06-13 16:17:47 +0800 |
---|---|---|
committer | Jagannadha Sutradharudu Teki <jaganna@xilinx.com> | 2013-06-13 22:55:24 +0530 |
commit | d6f64d4a11c2aa4318b20eeda04c564728705080 (patch) | |
tree | 74633fdd8859c271d01928918c9a6790a97b3e26 | |
parent | 0368292954c70d0413f849cb3d45b403beffeaa6 (diff) | |
download | u-boot-imx-d6f64d4a11c2aa4318b20eeda04c564728705080.zip u-boot-imx-d6f64d4a11c2aa4318b20eeda04c564728705080.tar.gz u-boot-imx-d6f64d4a11c2aa4318b20eeda04c564728705080.tar.bz2 |
spi: tegra114_spi: Convert to use spi_alloc_slave()
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
-rw-r--r-- | drivers/spi/tegra114_spi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/tegra114_spi.c b/drivers/spi/tegra114_spi.c index b11a0a1..4d2af48 100644 --- a/drivers/spi/tegra114_spi.c +++ b/drivers/spi/tegra114_spi.c @@ -152,13 +152,11 @@ struct spi_slave *tegra114_spi_setup_slave(unsigned int bus, unsigned int cs, return NULL; } - spi = malloc(sizeof(struct tegra_spi_slave)); + spi = spi_alloc_slave(struct tegra_spi_slave, bus, cs); if (!spi) { printf("SPI error: malloc of SPI structure failed\n"); return NULL; } - spi->slave.bus = bus; - spi->slave.cs = cs; spi->ctrl = &spi_ctrls[bus]; if (!spi->ctrl) { printf("SPI error: could not find controller for bus %d\n", |