Commit 0fb66b81 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mark Brown

spi: dw: 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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarSerge Semin <fancer.lancer@gmail.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD
Link: https://lore.kernel.org/r/20240531194723.1761567-3-andriy.shevchenko@linux.intel.comTested-by: default avatarNícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0535cf64
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/string.h> #include <linux/string.h>
#include <linux/of.h> #include <linux/of.h>
#include "internals.h"
#include "spi-dw.h" #include "spi-dw.h"
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
...@@ -438,8 +439,7 @@ static int dw_spi_transfer_one(struct spi_controller *host, ...@@ -438,8 +439,7 @@ static int dw_spi_transfer_one(struct spi_controller *host,
transfer->effective_speed_hz = dws->current_freq; transfer->effective_speed_hz = dws->current_freq;
/* Check if current transfer is a DMA transaction */ /* Check if current transfer is a DMA transaction */
if (host->can_dma && host->can_dma(host, spi, transfer)) dws->dma_mapped = spi_xfer_is_dma_mapped(host, spi, transfer);
dws->dma_mapped = host->cur_msg_mapped;
/* For poll mode just disable all interrupts */ /* For poll mode just disable all interrupts */
dw_spi_mask_intr(dws, 0xff); dw_spi_mask_intr(dws, 0xff);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment