projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0368292
)
spi: tegra114_spi: Convert to use spi_alloc_slave()
author
Axel Lin
<
[email protected]
>
Thu, 13 Jun 2013 08:17:47 +0000
(16:17 +0800)
committer
Jagannadha Sutradharudu Teki
<
[email protected]
>
Thu, 13 Jun 2013 17:25:24 +0000
(22:55 +0530)
Signed-off-by: Axel Lin <
[email protected]
>
Acked-by: Marek Vasut <
[email protected]
>
Reviewed-by: Jagannadha Sutradharudu Teki <
[email protected]
>
drivers/spi/tegra114_spi.c
patch
|
blob
|
history
diff --git
a/drivers/spi/tegra114_spi.c
b/drivers/spi/tegra114_spi.c
index b11a0a1ff7c8a190e22e543c041d04b0556a14d7..4d2af483d77f07688e6a4297a1ad952ea0d9a99a 100644
(file)
--- 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",