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

Simon Glass sjg at chromium.org
Tue Jun 11 16:49:32 CEST 2013


On Tue, Jun 11, 2013 at 6:57 AM, Axel Lin <axel.lin at ingics.com> wrote:

> Signed-off-by: Axel Lin <axel.lin at ingics.com>
>

Reviewed-by: Simon Glass <sjg at chromium.org>


> ---
>  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);
> --
> 1.8.1.2
>
>
>
>


More information about the U-Boot mailing list