diff options
| author | Marc Kleine-Budde <mkl@pengutronix.de> | 2026-03-19 19:55:44 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-04-07 13:54:32 +0300 |
| commit | 4ef7fa7bca5728a3f61c28da73d7714ed1f303a6 (patch) | |
| tree | 34616e7f5bb3b6e87c29e0d1a17cfc4b5691cd01 | |
| parent | b326c71d4e6f9623ee137bccf8205e4327aa1914 (diff) | |
| download | linux-4ef7fa7bca5728a3f61c28da73d7714ed1f303a6.tar.xz | |
spi: spi-fsl-lpspi: fsl_lpspi_write_tx_fifo(): simplify while() loop check
To simplify the loop check. Combine both conditions of the while() and the
directly following if() into the while().
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-10-02b56c5d44a8@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | drivers/spi/spi-fsl-lpspi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c index 7bc14e56dacc..3771fed7ea3f 100644 --- a/drivers/spi/spi-fsl-lpspi.c +++ b/drivers/spi/spi-fsl-lpspi.c @@ -262,9 +262,7 @@ static void fsl_lpspi_write_tx_fifo(struct fsl_lpspi_data *fsl_lpspi) txfifo_cnt = readl(fsl_lpspi->base + IMX7ULP_FSR) & 0xff; - while (txfifo_cnt < fsl_lpspi->txfifosize) { - if (!fsl_lpspi->remain) - break; + while (txfifo_cnt < fsl_lpspi->txfifosize && fsl_lpspi->remain) { fsl_lpspi->tx(fsl_lpspi); txfifo_cnt++; } |
