* [U-Boot] [PATCH 1/2] spi: tegra114_spi: Convert to use spi_alloc_slave()
@ 2013-06-13 8:17 Axel Lin
2013-06-13 8:21 ` [U-Boot] [PATCH 2/2] spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave Axel Lin
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Axel Lin @ 2013-06-13 8:17 UTC (permalink / raw)
To: u-boot
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
Forgot to CC mailing list, so here is a resend.
drivers/spi/tegra114_spi.c | 4 +---
1 file changed, 1 insertion(+), 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",
--
1.8.1.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave
2013-06-13 8:17 [U-Boot] [PATCH 1/2] spi: tegra114_spi: Convert to use spi_alloc_slave() Axel Lin
@ 2013-06-13 8:21 ` Axel Lin
2013-06-13 10:48 ` Marek Vasut
2013-06-13 17:33 ` [U-Boot] [U-Boot, " Jagan Teki
2013-06-13 10:48 ` [U-Boot] [PATCH 1/2] spi: tegra114_spi: Convert to use spi_alloc_slave() Marek Vasut
2013-06-13 17:33 ` [U-Boot] [U-Boot, " Jagan Teki
2 siblings, 2 replies; 8+ messages in thread
From: Axel Lin @ 2013-06-13 8:21 UTC (permalink / raw)
To: u-boot
It's done in spi_alloc_slave(), thus remove the redundant code.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/spi/tegra20_sflash.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c
index 9322ce7..7c3a3fc 100644
--- a/drivers/spi/tegra20_sflash.c
+++ b/drivers/spi/tegra20_sflash.c
@@ -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",
--
1.8.1.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave
2013-06-13 8:21 ` [U-Boot] [PATCH 2/2] spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave Axel Lin
@ 2013-06-13 10:48 ` Marek Vasut
2013-06-13 14:08 ` Jagan Teki
2013-06-13 17:33 ` [U-Boot] [U-Boot, " Jagan Teki
1 sibling, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2013-06-13 10:48 UTC (permalink / raw)
To: u-boot
Dear Axel Lin,
> It's done in spi_alloc_slave(), thus remove the redundant code.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> drivers/spi/tegra20_sflash.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c
> index 9322ce7..7c3a3fc 100644
> --- a/drivers/spi/tegra20_sflash.c
> +++ b/drivers/spi/tegra20_sflash.c
> @@ -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",
Acked-by: Marek Vasut <marex@denx.de>
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] spi: tegra114_spi: Convert to use spi_alloc_slave()
2013-06-13 8:17 [U-Boot] [PATCH 1/2] spi: tegra114_spi: Convert to use spi_alloc_slave() Axel Lin
2013-06-13 8:21 ` [U-Boot] [PATCH 2/2] spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave Axel Lin
@ 2013-06-13 10:48 ` Marek Vasut
2013-06-13 14:08 ` Jagan Teki
2013-06-13 17:33 ` [U-Boot] [U-Boot, " Jagan Teki
2 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2013-06-13 10:48 UTC (permalink / raw)
To: u-boot
Dear Axel Lin,
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> Forgot to CC mailing list, so here is a resend.
> drivers/spi/tegra114_spi.c | 4 +---
> 1 file changed, 1 insertion(+), 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",
Acked-by: Marek Vasut <marex@denx.de>
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] spi: tegra114_spi: Convert to use spi_alloc_slave()
2013-06-13 10:48 ` [U-Boot] [PATCH 1/2] spi: tegra114_spi: Convert to use spi_alloc_slave() Marek Vasut
@ 2013-06-13 14:08 ` Jagan Teki
0 siblings, 0 replies; 8+ messages in thread
From: Jagan Teki @ 2013-06-13 14:08 UTC (permalink / raw)
To: u-boot
On 13-06-2013 16:18, Marek Vasut wrote:
> Dear Axel Lin,
>
>> Signed-off-by: Axel Lin <axel.lin@ingics.com>
>> ---
>> Forgot to CC mailing list, so here is a resend.
>> drivers/spi/tegra114_spi.c | 4 +---
>> 1 file changed, 1 insertion(+), 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",
>
> Acked-by: Marek Vasut <marex@denx.de>
>
> Best regards,
> Marek Vasut
>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
--
Thanks,
Jagan.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave
2013-06-13 10:48 ` Marek Vasut
@ 2013-06-13 14:08 ` Jagan Teki
0 siblings, 0 replies; 8+ messages in thread
From: Jagan Teki @ 2013-06-13 14:08 UTC (permalink / raw)
To: u-boot
On 13-06-2013 16:18, Marek Vasut wrote:
> Dear Axel Lin,
>
>> It's done in spi_alloc_slave(), thus remove the redundant code.
>>
>> Signed-off-by: Axel Lin <axel.lin@ingics.com>
>> ---
>> drivers/spi/tegra20_sflash.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c
>> index 9322ce7..7c3a3fc 100644
>> --- a/drivers/spi/tegra20_sflash.c
>> +++ b/drivers/spi/tegra20_sflash.c
>> @@ -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",
>
> Acked-by: Marek Vasut <marex@denx.de>
>
> Best regards,
> Marek Vasut
>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
--
Thanks,
Jagan.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [U-Boot, 1/2] spi: tegra114_spi: Convert to use spi_alloc_slave()
2013-06-13 8:17 [U-Boot] [PATCH 1/2] spi: tegra114_spi: Convert to use spi_alloc_slave() Axel Lin
2013-06-13 8:21 ` [U-Boot] [PATCH 2/2] spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave Axel Lin
2013-06-13 10:48 ` [U-Boot] [PATCH 1/2] spi: tegra114_spi: Convert to use spi_alloc_slave() Marek Vasut
@ 2013-06-13 17:33 ` Jagan Teki
2 siblings, 0 replies; 8+ messages in thread
From: Jagan Teki @ 2013-06-13 17:33 UTC (permalink / raw)
To: u-boot
On 13-06-2013 13:47, Axel Lin wrote:
> 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>
>
> ---
> Forgot to CC mailing list, so here is a resend.
> drivers/spi/tegra114_spi.c | 4 +---
> 1 file changed, 1 insertion(+), 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",
>
Applied to u-boot-spi/master
--
Thanks,
Jagan.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [U-Boot, 2/2] spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave
2013-06-13 8:21 ` [U-Boot] [PATCH 2/2] spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave Axel Lin
2013-06-13 10:48 ` Marek Vasut
@ 2013-06-13 17:33 ` Jagan Teki
1 sibling, 0 replies; 8+ messages in thread
From: Jagan Teki @ 2013-06-13 17:33 UTC (permalink / raw)
To: u-boot
On 13-06-2013 13:51, Axel Lin wrote:
> It's done in spi_alloc_slave(), thus remove the redundant code.
>
> 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>
>
> ---
> drivers/spi/tegra20_sflash.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c
> index 9322ce7..7c3a3fc 100644
> --- a/drivers/spi/tegra20_sflash.c
> +++ b/drivers/spi/tegra20_sflash.c
> @@ -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.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-06-13 17:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-13 8:17 [U-Boot] [PATCH 1/2] spi: tegra114_spi: Convert to use spi_alloc_slave() Axel Lin
2013-06-13 8:21 ` [U-Boot] [PATCH 2/2] spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave Axel Lin
2013-06-13 10:48 ` Marek Vasut
2013-06-13 14:08 ` Jagan Teki
2013-06-13 17:33 ` [U-Boot] [U-Boot, " Jagan Teki
2013-06-13 10:48 ` [U-Boot] [PATCH 1/2] spi: tegra114_spi: Convert to use spi_alloc_slave() Marek Vasut
2013-06-13 14:08 ` Jagan Teki
2013-06-13 17:33 ` [U-Boot] [U-Boot, " Jagan Teki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox