spi: spi-fsl-lpspi: fsl_lpspi_can_dma(): directly assign return value to fsl_lpspi->usedma

The function fsl_lpspi_can_dma() returns a bool.

Simplify the code, remove the if/else and assign the return value of
fsl_lpspi_can_dma() directly to fsl_lpspi->usedma.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-8-02b56c5d44a8@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Marc Kleine-Budde
2026-03-19 17:55:42 +01:00
committed by Mark Brown
parent ca431d50bf
commit e59fe5e0c4

View File

@@ -519,10 +519,7 @@ static int fsl_lpspi_prepare_message(struct spi_controller *controller,
fsl_lpspi->usedma = false;
ret = fsl_lpspi_setup_transfer(controller, spi, t);
if (fsl_lpspi_can_dma(controller, spi, t))
fsl_lpspi->usedma = true;
else
fsl_lpspi->usedma = false;
fsl_lpspi->usedma = fsl_lpspi_can_dma(controller, spi, t);
if (ret < 0)
return ret;
@@ -796,10 +793,7 @@ static int fsl_lpspi_transfer_one(struct spi_controller *controller,
spi_controller_get_devdata(controller);
int ret;
if (fsl_lpspi_can_dma(controller, spi, t))
fsl_lpspi->usedma = true;
else
fsl_lpspi->usedma = false;
fsl_lpspi->usedma = fsl_lpspi_can_dma(controller, spi, t);
ret = fsl_lpspi_setup_transfer(controller, spi, t);
if (ret < 0)