Message ID | 20240531194723.1761567-6-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | spi: Rework DMA mapped flag | expand |
On Fri, May 31, 2024 at 10:42:37PM +0300, Andy Shevchenko wrote:
> Replace a few lines of code by calling a spi_xfer_is_dma_mapped() helper.
It appears that this patch is based on the cleanup series against the driver
that had been sent earlier. Namely this:
[v2] spi: pxa2xx: Get rid of an additional layer in PCI driver
https://lore.kernel.org/linux-spi/20240530151117.1130792-1-andriy.shevchenko@linux.intel.com/T/#t
And as others already said, this series is pure cleanup, no need to be backported.
On Mon, Jun 03, 2024 at 10:21:11PM +0300, Andy Shevchenko wrote: > On Fri, May 31, 2024 at 10:42:37PM +0300, Andy Shevchenko wrote: > > Replace a few lines of code by calling a spi_xfer_is_dma_mapped() helper. > > It appears that this patch is based on the cleanup series against the driver > that had been sent earlier. Namely this: > [v2] spi: pxa2xx: Get rid of an additional layer in PCI driver > > https://lore.kernel.org/linux-spi/20240530151117.1130792-1-andriy.shevchenko@linux.intel.com/T/#t Okay, now it should cleanly apply to spi/for-next (and indeed, it does, I just checked locally). > And as others already said, this series is pure cleanup, no need to be backported.
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;
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> --- drivers/spi/spi-pxa2xx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)