diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2018-03-18 14:53:35 +0300 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2018-05-16 16:49:06 +0300 |
commit | 266580612f16a4a45cced1bede7191b56ad4afd4 (patch) | |
tree | a7b3264fb2b06af5109435632755a49a96f3724f | |
parent | 8fad5e0b114fdd4c4e8d5f105ea3527df2c83986 (diff) | |
download | u-boot-266580612f16a4a45cced1bede7191b56ad4afd4.tar.xz |
spi: lpc32xx: simplify logical expression
A & A & B == A & B
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Jagan Teki <jagan@openedev.com>
-rw-r--r-- | drivers/spi/lpc32xx_ssp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/lpc32xx_ssp.c b/drivers/spi/lpc32xx_ssp.c index e6c876da07..ce12eee657 100644 --- a/drivers/spi/lpc32xx_ssp.c +++ b/drivers/spi/lpc32xx_ssp.c @@ -129,7 +129,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, int status = readl(&lslave->regs->sr); if ((idx_out < bytelen) && (status & SSP_SR_TNF)) writel(((u8 *)dout)[idx_out++], &lslave->regs->data); - if ((idx_in < bytelen) && (status & status & SSP_SR_RNE)) + if ((idx_in < bytelen) && (status & SSP_SR_RNE)) ((u8 *)din)[idx_in++] = readl(&lslave->regs->data); if (get_timer(start_time) >= CONFIG_LPC32XX_SSP_TIMEOUT) return -1; |