spi: tegra114_spi: Convert to use spi_alloc_slave()
Subsystems (2)
PATCH 1/2 spi: tegra114_spi: Convert to use spi_alloc_slave()
---
Forgot to CC mailing list, so here is a resend.
drivers/spi/tegra114_spi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/spi/tegra114_spi.c +1 -3
@@ -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",
Signature · 1 line
1.8.1.2
PATCH 2/2 spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave
It's done in spi_alloc_slave(), thus remove the redundant code.
--- drivers/spi/tegra20_sflash.c | 2 -- 1 file changed, 2 deletions(-)
drivers/spi/tegra20_sflash.c +0 -2
@@ -132,8 +132,6 @@ struct spi_slave *tegra20_spi_setup_slave(unsigned int bus, unsigned int cs,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",
Signature · 1 line
1.8.1.2
PATCH 2/2 spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave
Dear Axel Lin,
Quoted 14 lines
It's done in
spi_alloc_slave(), thus remove the redundant code.Signed-off-by Axel Lin <[email protected]>--- drivers/spi/tegra20_sflash.c | 2 -- 1 file changed, 2 deletions(-)drivers/spi/tegra20_sflash.c +0
-0@@ -132,8 +132,6 @@ struct spi_slave *tegra20_spi_setup_slave(unsigned intbus, unsigned int cs,
printf("SPI error: malloc of SPI structure failed\n");
drivers/spi/tegra20_sflash.c struct spi_slave *tegra20_spi_setup_slave(unsigned int bus, unsigned int cs, · line 137
Quoted 7 lines
drivers/spi/tegra20_sflash.c +0
-2return 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",
Best regards,
Marek Vasut
PATCH 1/2 spi: tegra114_spi: Convert to use spi_alloc_slave()
In reply to Axel LinDear Axel Lin,
Quoted 15 lines
Signed-off-by Axel Lin <[email protected]>---
Forgot to CC mailing list, so here is a resend.drivers/spi/tegra114_spi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/spi/tegra114_spi.c +0
-1@@ -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 ));
drivers/spi/tegra114_spi.c struct spi_slave *tegra114_spi_setup_slave(unsigned · line 162
Quoted 10 lines
drivers/spi/tegra114_spi.c +1
-2+ 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",
Best regards,
Marek Vasut
PATCH 1/2 spi: tegra114_spi: Convert to use spi_alloc_slave()
Quoted 30 lines · Marek Vasut
Dear Axel Lin,
Quoted 15 lines
Signed-off-by Axel Lin <[email protected]>---
Forgot to CC mailing list, so here is a resend.drivers/spi/tegra114_spi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/spi/tegra114_spi.c +0
-1@@ -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 ));drivers/spi/tegra114_spi.c struct spi_slave *tegra114_spi_setup_slave(unsigned · line 162
Quoted 10 lines
drivers/spi/tegra114_spi.c +1
-2+ 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",Acked-by Marek Vasut <[email protected]>
Quoted 3 lines
Best regards,
Marek Vasut
--
Thanks,
Jagan.
PATCH 2/2 spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave
In reply to Marek VasutQuoted 26 lines · Marek Vasut
Dear Axel Lin,
Quoted 16 lines
It's done in
spi_alloc_slave(), thus remove the redundant code.Signed-off-by Axel Lin <[email protected]>--- drivers/spi/tegra20_sflash.c | 2 -- 1 file changed, 2 deletions(-)drivers/spi/tegra20_sflash.c +0
-0@@ -132,8 +132,6 @@ struct spi_slave *tegra20_spi_setup_slave(unsigned intbus, unsigned int cs,
printf("SPI error: malloc of SPI structure failed\n");
return NULL;
}drivers/spi/tegra20_sflash.c struct spi_slave *tegra20_spi_setup_slave(unsigned int bus, unsigned int cs, · line 137
Quoted 5 lines
drivers/spi/tegra20_sflash.c +0
-2- 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",Acked-by Marek Vasut <[email protected]>
Quoted 3 lines
Best regards,
Marek Vasut
--
Thanks,
Jagan.
PATCH 1/2 spi: tegra114_spi: Convert to use spi_alloc_slave()
In reply to Axel LinQuoted 19 lines · Axel Lin
Signed-off-by Axel Lin <[email protected]>Acked-by Marek Vasut <[email protected]>Reviewed-by Jagannadha Sutradharudu Teki <[email protected]>---
Forgot to CC mailing list, so here is a resend.drivers/spi/tegra114_spi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/spi/tegra114_spi.c +0
-1@@ -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 ));
drivers/spi/tegra114_spi.c struct spi_slave *tegra114_spi_setup_slave(unsigned int bus, unsigned int cs, · line 162
Quoted 10 lines
drivers/spi/tegra114_spi.c +1
-2+ 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",
Applied to u-boot-spi/master
--
Thanks,
Jagan.
PATCH 2/2 spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave
In reply to Axel LinQuoted 16 lines · Axel Lin
It's done in
spi_alloc_slave(), thus remove the redundant code.Signed-off-by Axel Lin <[email protected]>Acked-by Marek Vasut <[email protected]>Reviewed-by Jagannadha Sutradharudu Teki <[email protected]>---
drivers/spi/tegra20_sflash.c| 2 --1 file changed, 2 deletions(-)drivers/spi/tegra20_sflash.c +0
-0
drivers/spi/tegra20_sflash.c struct spi_slave *tegra20_spi_setup_slave(unsigned int bus, unsigned int cs, · line 137
Quoted 8 lines
drivers/spi/tegra20_sflash.c +0
-2@@ -132,8 +132,6 @@ struct spi_slave *tegra20_spi_setup_slave(unsigned int bus, unsigned int cs,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",
Applied to u-boot-spi/master
--
Thanks,
Jagan.