[U-Boot] spi: armada100_spi: Remove unnecessary NULL test for dout and din

Jagan Teki jagannadh.teki at gmail.com
Thu Jun 13 19:32:50 CEST 2013


On 11-06-2013 19:27, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin at ingics.com>
> Reviewed-by: Marek Vasut <marex at denx.de>
> Acked-by: Ajay Bhargav <ajay.bhargav at einfochips.com>
> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki at gmail.com>
>
> ---
> drivers/spi/armada100_spi.c | 11 ++---------
>   1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/spi/armada100_spi.c b/drivers/spi/armada100_spi.c
> index afdbe05..b237c7c 100644
> --- a/drivers/spi/armada100_spi.c
> +++ b/drivers/spi/armada100_spi.c
> @@ -182,15 +182,8 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
>   		goto done;
>   	}
>
> -	if (dout)
> -		pss->tx = dout;
> -	else
> -		pss->tx = NULL;
> -
> -	if (din)
> -		pss->rx = din;
> -	else
> -		pss->rx = NULL;
> +	pss->tx = dout;
> +	pss->rx = din;
>
>   	if (flags & SPI_XFER_BEGIN) {
>   		spi_cs_activate(slave);
>

Applied to u-boot-spi/master

--
Thanks,
Jagan.


More information about the U-Boot mailing list