diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-05-31 21:42:37 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-06-10 13:49:01 +0200 |
commit | e47f92308031ebc29327494b1ab70d18bfa96a5d (patch) | |
tree | 5a700be90ff0f74bfeb428a3410bd64c57e664b5 /drivers/spi/spi-pxa2xx.c | |
parent | spi: omap2-mcspi: Use new spi_xfer_is_dma_mapped() helper (diff) | |
download | linux-e47f92308031ebc29327494b1ab70d18bfa96a5d.tar.xz linux-e47f92308031ebc29327494b1ab70d18bfa96a5d.zip |
spi: pxa2xx: Use new spi_xfer_is_dma_mapped() helper
Replace a few lines of code by calling a spi_xfer_is_dma_mapped() helper.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD
Link: https://lore.kernel.org/r/20240531194723.1761567-6-andriy.shevchenko@linux.intel.com
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Tested-by: NĂcolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-pxa2xx.c')
-rw-r--r-- | drivers/spi/spi-pxa2xx.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 1fb30201459f..16b96eb176cd 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -26,6 +26,7 @@ #include <linux/spi/spi.h> +#include "internals.h" #include "spi-pxa2xx.h" #define TIMOUT_DFLT 1000 @@ -993,11 +994,8 @@ static int pxa2xx_spi_transfer_one(struct spi_controller *controller, } dma_thresh = SSCR1_RxTresh(RX_THRESH_DFLT) | SSCR1_TxTresh(TX_THRESH_DFLT); - dma_mapped = controller->can_dma && - controller->can_dma(controller, spi, transfer) && - controller->cur_msg_mapped; + dma_mapped = spi_xfer_is_dma_mapped(controller, spi, transfer); if (dma_mapped) { - /* Ensure we have the correct interrupt handler */ drv_data->transfer_handler = pxa2xx_spi_dma_transfer; |